I have a server which just stops from time to time.
Where do I start looking for reasons why it stops?
I’ve checked /var/logs/xp and /home/xp/enonic/xp/logs but there’s no real java dump info to be found there.
If it’s responding you could try out the /status pages. There you will find various VM info. For 6.8 there’s also some thread-dump info and a dead-lock detection page.
Check if its out-of-mem with the command jstat -gcutil <pid number>. if the memory banks are up to a 100% the jvm is using all of its time trying to garbage collect.
And as always try do upgrade to the latest version of XP if possible.
ok so the first four columns tell you how full in prosent each of the jvms memory banks ( survivor 1, survivor 2, Eden and Old Generation ) are. data in memory is first put into Survivor 1 (S0) space. when that space goes full, he jvm will then do a garbage collect on those objects and move in ise objects to Survivor 2 (S1) space and so on. Heres a nice description on the architecture: https://dzone.com/articles/java-memory-architecture-model-garbage-collection
When all banks are almost full, there is a possibility that the jvm vill spend all cpu on garbage collction and stop responding. The next time xp hangs, check if cpu usage is high and then run this command. If most of the memory banks are full, or you get an error message saying you cant connect to jvm, then my guess is that there is something in your app thats eating up your memory.
Thanks for this.
The problem is that when the server stops, it just stops. There´s no “hang”. No leftover java process to check whether or not the cpu usage has been high.
So… how can I backtrack this? Run a crontab on the command regularly and output the results to a logfile?
Server crashed again tonight.
I added the parameters in server.sh like this, looks ok? Just as a precaution, I put them in both of the java opts. I don´t know which one is actually in use.
Also - even if there are no known issues with 6.4.x you are running close to a year old software now, so consider upgrading. BTW: What version of Java are you using. Errors like these are typically more related to JVM than XP.
/usr/lib/jvm/java-8-oracle/bin/java -version
java version “1.8.0_72”
Java™ SE Runtime Environment (build 1.8.0_72-b15)
Java HotSpot™ 64-Bit Server VM (build 25.72-b15, mixed mode)