Reputation: 59
I have tried to create a small utility which reads excel. I am using ApachePOI 3.9 library for that. When I executed the code from red hat Jboss, it work fine
but when i deployed the .war in server Jboss 7.1.1 Final and executed I got this error
ERROR [stderr] (thread-64) Exception in thread "Thread-64" Exception in thread "server-timer1" java.lang.OutOfMemoryError: Java heap space
Upvotes: 0
Views: 17765
Reputation: 18752
First step: Make sure that the JVM memory settings in your Redhat JBoss and JBoss 7.1.1 are the same. It may be that your Redhat JBoss has a higher memory allocation than JBoss 7.1.1. You might need to raise you jboss 7.1.1 memory settings as mentioned by @amitsalyan.
Second Step: Configure your JBoss 7.1.1 to generate a heapdump for postmartum if the server crashes with Outofmemory error.
Third Step: If the server fails again with outofmemory, there may be a memory leak that is caused by the libraries or your code. Use Eclipse MAT tool to find the memory issues and fix them.
Upvotes: 0
Reputation: 678
Could you please check your JVM memory allocation pool parameters. If you are running in standalone mode, you could find it it the JBOSS_HOME/bin/standalone.conf.bat
Try setting it to "JAVA_OPTS=-Xms1G -Xmx1G -XX:MaxPermSize=256M "
and restarting your server, this setting comes as default with JBoss EAP6.2
Also, if this doesn't help you could analyse the heap using the Eclipse Memory Analyser Find it here
Upvotes: 1