Many excuses, I really had forgotten to post my uWSGI version. 1.4.4 - is it stable enough?
Nevertheless great thanks for rapid and accurate answer! It seems unsubscribe-on-graceful-reload in vassal config has fixed the problem. 2013/1/30 Roberto De Ioris <[email protected]> > > > Hello everyone, > > > > When I touch the file named by touch-reload option, there is about 4 > > seconds to send request and get back 404 response and > > "3 upstream prematurely closed connection while reading response header > > from upstream, client: 10.0.2.2, server: foo.example.com, request: "GET > > http://foo.example.com/instance/ HTTP/1.1", upstream: "uwsgi:// > > 127.0.0.1:1336", host: "foo.example.com"" record into nginx error log. > > > > **The question is: is there any possibility to get seamless touch-reload? > > Yes, when there would not be these 4 seconds.** > > > > > > I'm running uWSGI in the Emperor mode on Debian Squeeze with these > command > > line options: > > > > --emperor /etc/uwsgi/apps-enabled --fastrouter > > 127.0.0.1:1336--fastrouter-subscription-server > > 127.0.0.1:1337 --pidfile /var/run/uwsgi/uwsgi.pid --master --daemonize > > /var/log/uwsgi.log > > > > Config of the single app placed in /etc/uwsgi/apps-enabled is > > > > [uwsgi] > > uid = foo2 > > logto = /home/foo2/%n.log > > virtualenv = /home/foo2/envs/foo2 > > pythonpath = /home/foo2/src/foo2/src > > pythonpath = /home/foo2/envs/foo2/var/wsgi/foo2 > > module = django_wsgi > > touch-reload = /home/foo2/envs/foo2/var/wsgi/foo2/django_wsgi.py > > master = 1 > > processes = 1 > > socket = 127.0.0.1:0 > > st = 127.0.0.1:1337:foo.example.com > > > > Nginx config for this app is > > > > server { > > listen 80; > > server_name foo.example.com www.foo.example.com; > > access_log /var/log/nginx/foo.example.com.access.log; > > charset utf-8; > > client_max_body_size 8m; > > > > gzip_types text/plain text/xml text/css application/javascript > > application/x-javascript application/json; > > > > location / { > > include uwsgi_params; > > uwsgi_param UWSGI_FASTROUTER_KEY $host; > > uwsgi_pass 127.0.0.1:1336; > > } > > > > # change /static to your static folder name > > location /static { > > root /home/foo2/src/foo2/src; > > autoindex off; > > expires 1M; > > } > > > > # admin media serving > > # (this location is available if django is installed from svn) > > location /media { > > root /home/foo2/envs/foo2/src/django/django/contrib/admin; > > expires 10m; > > autoindex off; > > } > > > > # redirect server error pages to the static page /50x.html > > error_page 500 502 503 504 /50x.html; > > location = /50x.html { > > root /var/www/nginx-default; > > } > > } > > > > If there is a need, I can supply with the result log entries. > > > > Thanks in advance! > > _______________________________________________ > > uWSGI mailing list > > [email protected] > > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi > > > > Be sure to use a uWSGI stable version, and check the > > --unsubscribe-on-graceful-reload > > option > > You are using a random socket, so very probably the fastrouter tries to > send requests to the old one a couple of times. > > -- > Roberto De Ioris > http://unbit.it > _______________________________________________ > uWSGI mailing list > [email protected] > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi >
_______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
