I've been using the Java Service wrapper in a custom application for quite a while and it's been working fine. Since updating our application to a new version in the last few days the JVM started hanging and then wrapper prints this in the log: JVM appears hung: Timed out waiting for signal from JVM.
It then automatically terminates the JVM and starts the app again. This happens after about 10 hours of running, which just makes it harder to debug.
Of course I am going to look through the changes that we've made, but no major changes were made that I would suspect is causing this type of problem.
Where can I look to try and figure out what is happening? Debug messages from the application don't indicate anything interesting. If the JVM just crashes it will usually create a dump, which can help in debugging it, but it's hanging, so it's not creating a dump. If I make it not restart the service automatically is there anything I can do to get some useful information out of the JVM before restarting it?
It seems to me that the JVM shouldn't hang from typical programming errors. What have you run into before that can cause the JVM to hang?
Read up on the wrapper.ping.timeout property. The wrapper software communicates with your JVM every so often to make sure that it is alive. If that communication fails for whatever reason, the wrapper deems the process hung and attempts to restart it.
Depending on how your application is architected, your JVM might be busy processing something else when the wrapper tries to "ping" it.