Current tip. In Emperor mode I am running one vassal. This is one application contained in one py file. Is registered a signal that it is monitoring the py file and reload if change. So restarts itself. Very nice for development.
[uwsgi] socket = /tmp/uwsgi/cos.sock chdir = /cos master = 1 processes = 1 single-interpreter = 1 module = start logdate = %%Y-%%d-%%m %%H:%%M:%%S disable-logging = 1 log-5xx = 1 vacuum = 1 harakiri = 3 reload-mercy = 3 After 20-30 minutes of work in this way (make changes and check results). Receives in the logs: 2011-05-03 06:17:52 - spawned uWSGI worker 1 (pid: 5669, cores: 1) 2011-05-03 06:17:52 - added watch 1 for filename start.py 2011-05-03 06:18:04 - fmon check 9 == 9 2011-05-03 06:18:04 - inotify returned 1 items 2011-05-03 06:18:04 - fmon check 9 == 9 Sat Mar 5 06:18:04 2011 - master sent signal 1 to worker 1 2011-05-03 06:18:04 - inotify returned 1 items Sat Mar 5 06:18:04 2011 - master sent signal 1 to worker 1 2011-05-03 06:18:04 - ...gracefully killing workers... 2011-05-03 06:18:04 - ...gracefully killing workers... 2011-05-03 06:18:04 - Gracefully killing worker 1 (pid: 5669)... 2011-05-03 06:18:05 - wait4() the spooler with pid 5668...2011-05-03 06:18:05 - done.2011-05-03 06:18:05 - binary reloading uWSGI... 2011-05-03 06:18:05 - closing all non-uwsgi socket fds > 2 (_SC_OPEN_MAX = 1024)... 2011-05-03 06:18:05 - found fd 5 2011-05-03 06:18:05 - running /usr/sbin/uwsgi *** has_emperor mode detected (fd: 7) *** [uWSGI] getting INI configuration from cos.ini 2011-05-03 06:18:05 - *** Starting uWSGI 0.9.7-dev (32bit) on [Sat Mar 5 06:18:05 2011] *** 2011-05-03 06:18:05 - compiled with version: 4.4.5 on 05 March 2011 03:03:14 2011-05-03 06:18:05 - your memory page size is 4096 bytes 2011-05-03 06:18:05 - *** WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers *** 2011-05-03 06:18:05 - uwsgi socket 0 inherited UNIX address /tmp/uwsgi/cos.sock fd 5 2011-05-03 06:18:05 - Python version: 2.6.6 (r266:84292, Sep 15 2010, 16:02:57) [GCC 4.4.5] 2011-05-03 06:18:05 - Python main interpreter initialized at 0x9266f38 2011-05-03 06:18:05 - your server socket listen backlog is limited to 100 connections 2011-05-03 06:18:05 - *** Operational MODE: single process *** 2011-05-03 06:18:07 - registered signal 1 2011-05-03 06:18:07 - WSGI application 0 (SCRIPT_NAME=) ready on interpreter 0x9266f38 (default app) 2011-05-03 06:18:07 - gracefully (RE)spawned uWSGI master process (pid: 5212) 2011-05-03 06:18:07 - spawned the uWSGI spooler on dir /cos/data/spooler with pid 5676 2011-05-03 06:18:07 - lowering spooler priority to 20 2011-05-03 06:18:07 - spawned uWSGI worker 1 (pid: 5677, cores: 1) 2011-05-03 06:18:07 - added watch 1 for filename start.py 2011-05-03 06:18:15 - fmon check 9 == 9 2011-05-03 06:18:15 - inotify returned 1 items Sat Mar 5 06:18:15 2011 - master sent signal 1 to worker 1 2011-05-03 06:18:15 - ...gracefully killing workers... 2011-05-03 06:18:15 - fmon check 9 == 9 2011-05-03 06:18:15 - inotify returned 1 items 2011-05-03 06:18:15 - Gracefully killing worker 1 (pid: 5677)... 2011-05-03 06:18:16 - wait4() the spooler with pid 5676...2011-05-03 06:18:16 - done.2011-05-03 06:18:16 - binary reloading uWSGI... 2011-05-03 06:18:16 - closing all non-uwsgi socket fds > 2 (_SC_OPEN_MAX = 1024)... 2011-05-03 06:18:16 - found fd 5 2011-05-03 06:18:16 - running /usr/sbin/uwsgi *** has_emperor mode detected (fd: 7) *** [uWSGI] getting INI configuration from cos.ini 2011-05-03 06:18:16 - *** Starting uWSGI 0.9.7-dev (32bit) on [Sat Mar 5 06:18:16 2011] *** 2011-05-03 06:18:16 - compiled with version: 4.4.5 on 05 March 2011 03:03:14 2011-05-03 06:18:16 - your memory page size is 4096 bytes 2011-05-03 06:18:16 - *** WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers *** 2011-05-03 06:18:16 - uwsgi socket 0 inherited UNIX address /tmp/uwsgi/cos.sock fd 5 2011-05-03 06:18:16 - Python version: 2.6.6 (r266:84292, Sep 15 2010, 16:02:57) [GCC 4.4.5] 2011-05-03 06:18:16 - Python main interpreter initialized at 0x9c61f38 2011-05-03 06:18:16 - your server socket listen backlog is limited to 100 connections 2011-05-03 06:18:16 - *** Operational MODE: single process *** 2011-05-03 06:18:18 - registered signal 1 2011-05-03 06:18:18 - WSGI application 0 (SCRIPT_NAME=) ready on interpreter 0x9c61f38 (default app) 2011-05-03 06:18:18 - gracefully (RE)spawned uWSGI master process (pid: 5212) 2011-05-03 06:18:18 - spawned the uWSGI spooler on dir /cos/data/spooler with pid 5683 2011-05-03 06:18:18 - lowering spooler priority to 20 2011-05-03 06:18:18 - spawned uWSGI worker 1 (pid: 5684, cores: 1) 2011-05-03 06:18:18 - added watch 1 for filename start.py 2011-05-03 06:18:31 - fmon check 9 == 9 2011-05-03 06:18:31 - inotify returned 1 items Sat Mar 5 06:18:31 2011 - master sent signal 1 to worker 1 Auto restart is no longer working. What's more vassal not respond to the HUP signal. Serves the request correctly, but you can kill it only after "kill -9". -- Łukasz Wróblewski http://www.nri.pl/ - Nowoczesne Rozwiązania Internetowe http://www.hostowisko.pl/ - Profesjonalny i tani hosting http://www.katalog-polskich-firm.pl/ - Najlepszy darmowy katalog firm _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
