The size of the war file will have very little impact on you receiving the OutOfMemoryException. Typically, this can be caused by either your application creating Objects on the Heap where a reference is retained to the Object (memory leak) or through resource contention.
What size of Heap do you have set? How much physical memory is available? What is the size of the various generations and the permanent space? You also want to address questions like: what Objects are being allocated in my application? which ones are surviving garbage collections?
To answer the latter, you should use some kind of memory profiling tool to find these "loitering objects" and remove the references. You will also want to examine the various JVM settings you have set and have available to you.
Hope this helps
Thanks for ur help.
Physical memory available is 203MB
I set Heap Size is 508MB.
Can you give idea about session is that we have to call clear() or close() methods or both..it effect on performance of application.
Please let me know about memory profiling tool ,which tool is good.