Failed to commit transaction: Java heap space (error 613)

#1

Hi,

the following exception occurred in our production machine last night:

2013-07-17 20:41:46,665 pdnsrttor3rc42-WSAgent-2-Existing/16 ERROR ObjectDbMessagePipe - Failed to put a message on queue:  pdnsrttor3rc42-ReportDSGroup_Instance-2 retrying = true
[ObjectDB 2.4.6_10] javax.persistence.RollbackException
Failed to commit transaction: Java heap space (error 613)

We are using ObjectDB 2.4.6_10, JDK 7, and a 30GB heap space.

The exception above took our server into an non-responsive state but left the JVM up, thus didn't trigger the automatic restart.

If the heap space is exhausted, we'd like the JVM to terminate so that a heap dump is generated (we enabled -XX:+HeapDumpOnOutOfMemoryError for this) and our infrastructure can automatically restart the server.

Two questions:

a) What do you suggest to fix the issue above at the root - other than increasing heap size (currently not an option for us) or periodically restarting the JVM?

b) Can we configure ObjectDB to use less heap space and persist more data on disk instead?

c) Can we configure ObjectDB not to throw the exception mentioned above and instead keep allocating memory until the JVM itself detects an OOME and subsequently terminates the VM?

This is a rather urgent issue, so your reply is appreciated.

Thanks

Christian

#2

If you have a full stack trace of the exception (which could be missing in OutOfMemoryError) it may help. We may be able to add a configuration option that will enable JVM shutdown in such cases. In addition, please try to get a full heap dump (of all the active threads) if this happens again.

To avoid this issue without increasing heap size you would have to change the ObjectDB configuration.

Relevant parameters include:

You may try each of these parameters to assess how it affects the performance and the heap usage in your specific application.

 

ObjectDB Support

Reply