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.bat
script) it is working fine. But when users try to start server usingWindows service
approach , 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.bat
file just like the following way, but users are still getting the sameOutOfMemoryError
inserver.log
file while runningEAP 6
server as window service but using command prompt to start the server it is running fine without any error. Presently memory configuration in thestandalone.conf.bat
file is shown as below.
...
set "JAVA_OPTS=-Xms2G -Xmx4G -XX:MaxPermSize=1G"
...
- Interestingly the
service.bat
file for theWindows service
also seems to set theJAVA_OPTS
property exclusively like the following way.
set JAVA_OPTS=-Xrs
- Why is it still throwing the
OutOfMemoryError
onPermGen space
even after thePermGen
space has been increased through appropriate JVM parameter throughstandalone.conf.bat
file ? - 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.