[Python-au] running a socket server as deamon
harry.python at gmail.com
Mon Feb 15 14:10:09 UTC 2010
You can use many Python module to run your server as daemon.
zdaemon, daemonize ...
If your server always crash, you need monitor run in cron. There are
many ways to do, I like this:
1. Server start, write its pid to "pidfile"
2. Server go to daemon
3. cron monitor script run every 5minute
4. cron monitor check if port is accessable, if ok do nothing
5. if port is down, kill the pid in pidfile, and restart the server
More information about the python-au