I have two python scripts for a socket server one of them just servers a policy file the other one is the actual server.
I run them as root from shell like so :
>python policyServer.py > log1.txt &
>python socketServer.py > log2.txt &
Then my flash client can connect and communicate with the sockeServer just fine.
After I left those two python apps running over night and came back this morning both of them were gone from the "top" and the flash client was no longer working.
The python scripts are using non-blocking sockets and just have something like (pseudocode):
Code:
while True:
ready_to_read, ready_to_write, in_error = select.select(changed_sockets,[],[])
for s in ready_to_read:
s.read()
Is there a limit to the time a python app can run? Or is something in Linode's system killing scripts that are running for a long time? I want these scripts to run as long as my Linode is running.
Edit found some code that would prevent the scripts from receiving hang up signals going to try with this and see if they still get killed :
Code:
nohup python policyServer.py > policyLog.txt &
nohup python simpleServer.py > simpleServerLog.txt &