JVM configurations set through Windows service 'service.bat' file seems to override configurations from 'standalone.conf.bat' file
Issue
- When deploying an application on
Red Hat JBoss EAP 6.2.0, where the server was started using command prompt (i.e.standalone.batscript) it is working fine. But when users try to start server usingWindows serviceapproach , it throws the following exception.
...
06:16:03,966 WARN [org.jboss.modules] (DeploymentScanner-threads - 2) Failed to define class org.jboss.as.server.deployment.scanner.ZipCompletionScanner in Module "org.jboss.as.deployment-scanner:main" from local module loader @735c3f7b (finder: local module finder @2d4bdf68 (roots: C:\jboss-eap-6.2.0\modules,C:\jboss-eap-6.2.0\modules\system\layers\base)): java.lang.OutOfMemoryError: PermGen space
...
- Users also tried increasing the Heap and PermGen memory in
standalone.conf.batfile just like the following way, but users are still getting the sameOutOfMemoryErrorinserver.logfile while runningEAP 6server as window service but using command prompt to start the server it is running fine without any error. Presently memory configuration in thestandalone.conf.batfile is shown as below.
...
set "JAVA_OPTS=-Xms2G -Xmx4G -XX:MaxPermSize=1G"
...
- Interestingly the
service.batfile for theWindows servicealso seems to set theJAVA_OPTSproperty exclusively like the following way.
set JAVA_OPTS=-Xrs
- Why is it still throwing the
OutOfMemoryErroronPermGen spaceeven after thePermGenspace has been increased through appropriate JVM parameter throughstandalone.conf.batfile ? - We are facing issue where if we start the JBOSS from command line it is picking up the JVM setting defined in "standalone.conf.bat" but it doesn't pick the same if we start it from windows Services.
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.2.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.