I have implemented a simple socket server in Java. Everything works great except the process just dies/times out after about an hour and I do not know why. I run am running the process through my web host's machine using SSH.
1. Add to '/etc/rc.local' two commands: 'cd /path/to/.classname' and 'java .classname'
2. Reboot and check process with 'ps -A' and see my 'java' process running. Everything's good.
3. check back periodically and note that after about an hour 'java' process simply disappears
There could not be a crash because no clients were connecting during that time. The process was just sitting and blocking at ssock.accept();
I tried ssock.setSoTimeout(0) but it doesn't help.
Any ideas? Perhaps JVM killing it?