#!/bin/sh
while true
do
java -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Xmx256m -Xms64m -XX:MaxPermSize=128m -classpath .:lib/ohj-jewt.jar:lib/MRJAdapter.jar:lib/compat141.jar:lib/commons-codec.jar:lib/commons-httpclient.jar:lib/activation.jar:lib/antlr.jar:lib/commons-collections.jar:lib/commons-dbcp.jar:lib/commons-fileupload-1.0.jar:lib/commons-logging.jar:lib/commons-pool.jar:lib/concurrent.jar:lib/dom4j.jar:lib/help.jar:lib/hibernate3.jar:lib/j2db.jar:lib/j2dbdev.jar:lib/jdbc2_0-stdext.jar:lib/jmx.jar:lib/jndi.jar:lib/js.jar:lib/jta.jar:lib/BrowserLauncher2.jar:lib/jug.jar:lib/log4j.jar:lib/mail.jar:lib/ohj-jewt.jar:lib/oracle_ice.jar:lib/server-bootstrap.jar:lib/servlet-api.jar:lib/wicket-extentions.jar:lib/wicket.jar:lib/wicket-calendar.jar:lib/xerces.jar:lib/concurrent.jar:lib/slf4j-api.jar:lib/slf4j-log4j.jar:lib/joda-time.jar:lib/rmitnl.jar:lib/networktnl.jar com.servoy.j2db.server.ApplicationServer "$@" 1>> server.log 2>> server.log
EXITCODE=$?
if [ "$EXITCODE" != 99 ]; then exit $EXITCODE; fi
done
Only about 4-5 users on at any time, but often none or one or two.
No batch processes.
It may be a conincidence, but it started happening after moving to the http tune i think, although it took a few weeks for the server to reach over 60% of CPU on the java service.
This is remedied by restarting the servoy service, it gets to about 20% of CPU usage constantly after about a week and remains there even if no users are logged in.
I will keep and eye on the threads, but at present it is reading about 49 with 6% CPU usage having restarted it last night with only one user logged in. I thin the threads go up with the CPU usage.
I attach a current graph of CPU usage and it will rise tomorrow i am sure.
We’re running the tunnel internally on our servers as well, but do not see the problem you’re having.
The tunnel barely uses any CPU, so I cannot imagine that it is causing the CPU problems. It would be interesting to know which threads are using up the CPU, maybe you can monitor it with jconsole.
On a practical note, is there a linux command line option to restart servoy, so i can put it on the cron each night. At least this would stop the CPU usage climbing to a disastrous level.
Did you already try adding the -Djava.security.egd=file:/dev/urandom flag to the java commandline in the servoy_server.sh as mentioned below? Please try this first!
And using jconsole to connect to localhost:11111 to see what is going on.
The tunnel really does nothing CPU intensive at all, so I find this very strange, and I’m going to need a lot more information to be able to see what’s going no here.
Is there anything in your logs?
Is it possible for me to connect to the server myself and inspect it with jconsole?