but can you please tell me the reason for this and how can i resolve that.
No, we can't. The reasons why the client (a browser if I understand correctly) and the server might run out of memory, and the remedies for those conditions, are very different.
Precisely where are you seeing these error messages?