unix - Nohup java process timeout or killed -
i have java application compiled , packed jar file. contains while(true) loop inside application.
my main problem this, when run application in unix server using
nohup java -jar processname.jar > log.txt it starts well. after while(i not know reason, , log file not exist exception) seems shut down. can see process ps -ef log file , output file not change @ all.
nohup process shuts down after while? have timeout or configuration have make? , best way create background process @ server?
nohup won't stop unless program exits or interrupt process (this includes disconnecting ssh shell). launch program in background, add ampersand (&) after command: nohup java -jar processname.jar > log.txt &
screen can useful if want kill later.
if it's still stopping when run in background, in java code silently exiting, investigate there.
and 1 additional possibility -- on machines, low-priority cpu-hogging programs can killed automatically. if while loop isn't ever yielding, (though unlikely) might reason process getting shut down.
Comments
Post a Comment