Handling OutOfMemoryError in ESB Container

Posted by habin123 on 11-Jul-2012 23:05

Hello everybody,

                          Is there a way to handle OOM error in an ESB container ? Is there a way I can send notification during this error ? So that people can restart the container or increase the heap size.

Thanks,

Habin

All Replies

Posted by sumit_saxena on 21-Aug-2012 11:27

You can try to increase java heap Xms and Xmx arguments.

Anyways can you please let us know which version of Sonic you are using, what is ur enviornment?

Secondly , to check the container status and alert users on its getting down, you can try to write code for monitoring container metrices and Domain metrices using Sonic Management API for various kind of alert monitoring

Posted by davidg on 21-Aug-2012 11:55

There is no specific logic in ESB or MQ to handle OOM; the general view is that further failures can be expected and any specific actions could lead to further OOM conditions or JVM failure.

Please take a look at HeapDumpOnOutOfMemoryError on this page. With such a setting it would be possible to monitor for the generation of a heap dump file and take some action based on its presence.

Note that blindly increasing the max heap size will not always prevent OOM conditions. Additional memory is required by VMs for the VM itself, JIT compiled code, etc. If you increase the heap to be too large for a given max process size, then you can still get memory failures due to lack of other space.

Also note that in most cases OOM occurs because of bugs or a poorly tuned application. If you get an OOM and a heap dump is generated, you should provide that heap dump with any support call.

This thread is closed