If a pico server instyance runs out of memory during, for example, a system import, the System Log might not be properly updated with the out of memory information. To make sure that this critical error information is properly stored in System Log, an oom script is run each time an OutOfMemoryError exception is thrown. The JVM is started using the -XX:OnOutOfMemoryError=oom flag, which enables the JVM to catch all OutOfMemoryError exceptions from the oom script.

OOM Script

The oom script uses three parameters to generate output:


It is not allowed to update the oom script to return any other info, since this might cause the logging to System Log to fail or incorrect info will be included in System Log.


Each time the platform or an EC is restarted, the contents of the critical error log will be added to the System Log (one line per OutOfMemoryError occasion) and the critical error log will then be removed.


Tue Jan 17 17:21:11 CET 2012 OutOfMemoryError on ec1at host-e6410. See ec1.log for more information


User Defined Script

It is possible to use a user defined script for sending, for example, e-mail notifications related to the OutOfMemoryError exception. This script must be called user_oom and located in MZ_HOME/bin. If user_oom is available, the oom script will call it and forward the $1 and $2 parameter values.



2.13 Enabling Scalable Batch Transaction Service