Same problem here, the few lines in the source looks okay, but it it sure
as hell isn't the zero error or loss reload in Apache. My last question to
this list was unanswered tho, I'm glad someone else has the same issue so
it's not only on my setup.

Kind regards,

Chi Ho Kwok
On Jan 30, 2013 7:46 AM, "Den Untevskiy" <[email protected]> wrote:

> 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
>
>
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to