Re: Strange problem with a thread that goes to sleep....
- From: Ian Mills <news@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 25 Jan 2006 20:23:26 +0000
eftal wrote:
It may be worth redirecting stdout and stderr to a file as sometimes errors will be shown here that are not caught in your try/catch blocks.
Hello,
I have a JAva program that runs all day long mimicking daemons. IT calls Thread.sleep between each iteration. I am running it on an NT server.
Eerything is wrapped in try / catch block...however the program will sometimes quit. It will not throw an exception, or give any kind of JVM error. Its as if somerthing wiped it out of memory. Here are the exact 3 lines of code:
log("sleeping"); Thread.sleep(30000); log("woke up");
I was thinking that it somehow did not wake up, but I see no trace of java.exe in the task manager when it quits. I found out through my research that a java process might sleep and never wake up if the system time is adjusted during its sleep. However, I don't belieeve this is happening b/c I don't have a dead java.exe process in the task manager.
Another hint I recieved was that if someone logs onto the server, and than logs off, it may send the java.exe a signal to shutdown...which can be avoided with -XRS command line option. However, I can not recreate this scenario...
Anyone know what might be going on?
Thanks, eF.
.
- References:
- Prev by Date: Re: String Manipulation
- Next by Date: Re: local class philosophy
- Previous by thread: Strange problem with a thread that goes to sleep....
- Next by thread: Re: Strange problem with a thread that goes to sleep....
- Index(es):
Relevant Pages
|