Forums Register Login

Server restarting - Out of Memory Exception

+Pie Number of slices to send: Send
Hi,

We are using Websphere 5.1 and after our recent production deployment, server is restarting every 3-4 hrs. I am able to see some OutOfMemory and stack overflow exception.

Is there a way I can find out what piece of code is causing the problem and any tips for not getting in this problem in the future...

Thanks in advance...

Karan
+Pie Number of slices to send: Send
There are a lot of things that can cause out of memory errors. If you notice that a particular operation, like a database query or file load, causes it, you may be trying to load too much data in the virtual machine. You can either increase the VM's size or process the data in smaller pieces.
If the problem is more intermittent, it may be caused by not freeing up resources correctly. Any file, socket, database connection or other resource must be freed by invoking close(). This must be done in the finally block of a try-catch-finally structure to make sure close() is invoked.
If the cause is not obvious, you are probably accumulating data somewhere and never freeing it. HashMap/Table can have this problem if your objects don't implement hashcode correctly. The JVM has some tools to help you monitor the VM: Monitoring and Managing Java SE 6 Applications.
+Pie Number of slices to send: Send
Apart from Joe said, the other potential area is executing a block of code infinitly. Pls look at the loops and recursive function calls in the code. If this is happening after a recent production code release, concentrate on the release code changes.
[ April 15, 2008: Message edited by: Gurunath Policherla ]
+Pie Number of slices to send: Send
 

Originally posted by Gurunath Policherla:
the other potential area is executing a block of code infinitly. Pls look at the loops and recursive function calls in the code.



I would think that circumstance would cause a StackOverflowError rather than an OutOfMemoryError
In any case, please don't Wake The Zombies. I don't think Karan's been quietly watching this topic for 2 months waiting for more input.
That's my roommate. He's kinda weird, but he always pays his half of the rent. And he gave me this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1103 times.
Similar Threads
Error while starting the server
CORBA.OBJECT_NOT_EXIST
connection pool problem ,
SEVERE: BAD packet signature: SEVERE: Error, processing connection
Problem with UPDATE statement in HSQLDB
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 18:25:53.