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

Popular posts from this blog

How to understand 2 main() functions after using uftrace to profile the C++ program? -

c# - Update a combobox from a presenter (MVP) -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -