My bad, we use http-socket in prod and for some reason I put http locally
and checked only our prod settings.

Try again...

With no-defer-accept:

$ uwsgi --http-socket :9090 --wsgi-file test.py --single-interpreter
--master --die-on-term --enable-threads --pyhome ~/tmp/testenv --harakiri
28 -l 3 --no-defer-accept

$ time telnet localhost 9090
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /test HTTP/1.1

HTTP/1.1 200 OK
Content-Type: text/html

Hello WorldConnection closed by foreign host.

real    2m22.434s
user    0m0.003s
sys     0m0.006s

All requests responded (waiting as long as necessary) except one which
ended with:

curl: (56) Recv failure: Connection reset by peer

after 1min46


Without --no-defer-accept:

$ uwsgi --http-socket :9090 --wsgi-file test.py --single-interpreter
--master --die-on-term --enable-threads --pyhome ~/tmp/testenv --harakiri
28 -l 3

$ time telnet localhost 9090
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /test HTTP/1.1

Connection closed by foreign host.

real    1m17.867s
user    0m0.000s
sys     0m0.008s

and worked another time:

$ time telnet localhost 9090
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /test HTTP/1.1

HTTP/1.1 200 OK
Content-Type: text/html

Hello WorldConnection closed by foreign host.

real    1m59.701s
user    0m0.000s
sys     0m0.004s


So either way, uwsgi still accepts the connection.


On Tue, Aug 19, 2014 at 11:49 AM, Roberto De Ioris <[email protected]> wrote:

>
> > Thanks Roberto,
> >
> > I've checked, we already use --http-socket.
> >
> > I've just tried the --no-defer-accept option locally, it doesn't change
> > anything.
> >
> > What I do to test:
> >
> > $ uwsgi --http :9090 --wsgi-file test.py --single-interpreter --master
> > --die-on-term --enable-threads --pyhome ~/tmp/testenv --harakiri 28 -l 3
> > --no-defer-accept
>
>
> i have told you that http-socket is different from http, and here you test
> with http :)
>
> http is a non-blocking proxy, it will continue to accept until it has free
> file descriptors.
>
> You need to test with --http-socket with and without --no-defer-accept
> --
> Roberto De Ioris
> http://unbit.it
> _______________________________________________
> uWSGI mailing list
> [email protected]
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>



-- 
Francois
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to