I have a problem with my JBOSS while reading and processing a large XML file.
My hardware:
-OS: Windows 2008 Server R2 Enterprise
-CPU: Intel E7210 @ 2.4 Ghz (Dual Core)
-RAM: 12 GB
I try to read a XML file which is about 370 MB large.
While my program in the JBOSS is reading this file the memory usage increases to about 5 GB.
But every time JBOSS crashes and reboots while reading the file.
There is no hint in the logfile, why JBOSS is rebooting:
The part with fromHdd.trf is the part where I start reading the xml file (at 16:46:57,411)
Two seconds later (at 16:48:31,036) the jboss is rebooting without any error.
Part of the jboss log:
2012-07-09 16:46:51,083 INFO [de.softproject.integration.engine.X4engine] Started process "iMan_WebConnect/Stammdaten/ERW16/AttributeSets/Process/getAttributeSetsFromCML.wrf".
2012-07-09 16:46:57,411 INFO [de.softproject.integration.engine.X4ModuleImpl] Executed action "fromHdd.tra" in 6.313 ms.
2012-07-09 16:48:31,036 INFO [com.arjuna.ats.jbossatx.jta.TransactionManagerService] JBossTS Transaction Service (JTA version) - JBoss Inc.
2012-07-09 16:48:31,036 INFO [com.arjuna.ats.jbossatx.jta.TransactionManagerService] Setting up property manager MBean and JMX layer
2012-07-09 16:48:31,645 INFO [com.arjuna.ats.jbossatx.jta.TransactionManagerService] Starting recovery manager
2012-07-09 16:48:31,755 INFO [com.arjuna.ats.jbossatx.jta.TransactionManagerService] Recovery manager started
2012-07-09 16:48:31,755 INFO [com.arjuna.ats.jbossatx.jta.TransactionManagerService] Binding TransactionManager JNDI Reference
2012-07-09 16:48:35,926 INFO [org.jboss.ejb3.EJB3Deployer] Starting java:comp multiplexer
My guess:
The Java program uses the saxon parser.
Java or the saxon parser causes a memory fault.
This part is from the file wrapper.conf were I have configured an amount of 8GB RAM to Java.
# Java Additional Parameters
wrapper.java.additional.1=-Dprogram.name=run.bat
wrapper.java.additional.2=-Dx4.config.file=../../X4config.xml
wrapper.java.additional.3=-Djavax.xml.transform.TransformerFactory=net.sf.saxon.TransformerFactoryImpl
wrapper.java.additional.4=-Xms128m
wrapper.java.additional.5=-Xmx8192m
wrapper.java.additional.6=-XX:MaxPermSize=256m
wrapper.java.additional.7=-server
wrapper.java.additional.8=-Dsun.rmi.dgc.client.gcInterval=3600000
wrapper.java.additional.9=-Dsun.rmi.dgc.server.gcInterval=3600000
wrapper.java.additional.10=-Djava.endorsed.dirs=../lib/endorsed
What can I do, to prevent JBOSS from reboting.
Hope you have some Ideas.
Best Regards
LStrike
PS: Yes I know, I have not posted any Code.
I can not access the code, which is behind the funktion fromHdd.trf, so I try to get some answers in general.
At this point, some kind of “out of memory” problem seems like the most likely explanation, but you REALLY need some evidence:
You should figure out how to get some more information out of JBoss about what is causing the restart. Check all of the log files. If there is nothing relevant, change your logging settings to increase the amount of logging.
You should consider the possibility that the JBoss JVM is being killed externally because of a “ulimit” resource limit on the process, or due to the action of the “OOM killer”. You’d expect there to be some indications of these in the operating system logs.
How can you prevent this? Well, the only suggestions I have are the obvious ones.
Increase the JVM Heap size. (But depending on how the problem is causing JBoss to restart, this might make things worse.)
Limit the size of the input, or break it into smaller chunks.
Rewrite the part that is using XSLT to do the transformation some other way. (Saxon is not a parser. It is an XSLT engine.)
Switch to a more efficient XSLT engine. The accepted Answer to this SO Question ( What is the Most Efficient Java-Based streaming XSLT Processor? ) says that Saxon-SA is the most efficient one around in terms of memory usage.