jia,
When I have seen the JVM taking up 100% of the CPU in the past, it was due to a bug in a program, rather than a JVM setting that needs to be changed. The normal configuration settings for the JVM are memory related, not CPU related.
We need to work out if the problem is with the wrapper that starts LAMS, or with LAMS itself. Can you go through the following steps and tell me what is happening.
(1) Start up Windows.
(2) Does LAMS try to start straight away?
If no, go to (3)
If yes, then stop whatever is starting LAMS. This is probably the LAMS service. To stop the service, go to the Control Panel, then Administrative Tools, then Services.
There should be a LAMSv2 service. Right mouse click to get the popup menu and select properties. In the Properties dialog box, click Stop to stop LAMS and set the Startup type to Disabled. Click OK to save the change, close the services window and restart Windows. Now when Windows starts up, LAMS should NOT start up automatically. See the attached screenshot for help with the Properties dialog box.
(3) With LAMS NOT running, check your CPU. Is it okay?
(4) Now we will try to start LAMS directly (without starting the wrapper).
Find the file C:\lams\jboss-4.0.2\bin\run.bat and open it in a text editor (e.g. Notepad). Near the end of the file are the lines:
:RESTART
ECHO "%JAVA%" %JAVA_OPTS% "-Djava.endorsed.dirs=%JBOSS_ENDORSED_DIRS%" -classpath "%JBOSS_CLASSPATH%" org.jboss.Main %*
IF ERRORLEVEL 10 GOTO RESTART
Remove the "ECHO" so that it just has
:RESTART
"%JAVA%" %JAVA_OPTS% "-Djava.endorsed.dirs=%JBOSS_ENDORSED_DIRS%" -classpath "%JBOSS_CLASSPATH%" org.jboss.Main %*
IF ERRORLEVEL 10 GOTO RESTART
Then open your command line window and run the script C:\lams\jboss-4.0.2\bin\run.bat.
This will start up LAMS without starting the wrapper. LAMS will stay running as long as you keep this window open.
Does your CPU go to 100% now?
If so, find the files C:\lams\jboss-4.0.2\server\default\log\server.log and C:\lams\jboss-4.0.2\bin\lams.log. Zip them up and attach them to a posting here (do not try to paste them into a message). Then we will look at them and see if we can see any errors in the log files.
(5) To stop LAMS, you can close the command line window.
If you did get the CPU going to 100% then stop here. There is no point doing anything else with the wrapper if starting LAMS itself causes the JVM to take up all the CPU.
(6) Now try running it using the wrapper.
Go back into C:\lams\jboss-4.0.2\bin\run.bat and put the "ECHO" back into the file. So the lines will now look like:
:RESTART
ECHO "%JAVA%" %JAVA_OPTS% "-Djava.endorsed.dirs=%JBOSS_ENDORSED_DIRS%" -classpath "%JBOSS_CLASSPATH%" org.jboss.Main %*
IF ERRORLEVEL 10 GOTO RESTART
Go to the wrapper.conf file and add the following two lines at the end:
wrapper.ping.timeout=60
wrapper.cpu.timeout=30
Now start LAMS using the "Start LAMS" icon in the Program Files menu. This will start the wrapper.
Now what happens? If the CPU now goes to 100%, then take a copy of the logs C:\lams\jboss-4.0.2\server\default\log\server.log and C:\lams\jboss-4.0.2\bin\lams.log. Zip them up and attach them to a posting here and we will look at them.
Fiona
Posted by Fiona Malikoff