Hi Neha,
Kindly check the current system resource usage for each context by entering the #show resource usage
command .
If the resource usage percentage is high, the ACE is overloaded .
Use the copy running-config startup-config command instead of the write memory command. May be it can solve your issue for now.
Write back if it does not sovle your issue.
Sachin Garg