Can X be greater than 10? See my new test, I can definitely send at least
12 requests.

To be sure curl is not doing weird things, I've switched to a telnet only
test. My script uses expect:

#!/usr/bin/expect

set timeout 3
spawn telnet localhost 9090
expect "^]'."
send "GET /test HTTP/1.1\r\r"
set timeout 300
expect eof

*uwsgi is running with --no-defer-accept*

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

*And all connections are established:*

$ ss -p | grep telnet
tcp    ESTAB      0      0            127.0.0.1:38508         127.0.0.1:9090
    users:(("telnet",8654,3))
tcp    ESTAB      0      22           127.0.0.1:38528         127.0.0.1:9090
    users:(("telnet",8684,3))
tcp    ESTAB      0      22           127.0.0.1:38532         127.0.0.1:9090
    users:(("telnet",8704,3))
tcp    ESTAB      0      22           127.0.0.1:38530         127.0.0.1:9090
    users:(("telnet",8694,3))
tcp    ESTAB      0      22           127.0.0.1:38531         127.0.0.1:9090
    users:(("telnet",8699,3))
tcp    ESTAB      0      0            127.0.0.1:38519         127.0.0.1:9090
    users:(("telnet",8659,3))
tcp    ESTAB      0      0            127.0.0.1:38505         127.0.0.1:9090
    users:(("telnet",8649,3))
tcp    ESTAB      0      22           127.0.0.1:38527         127.0.0.1:9090
    users:(("telnet",8679,3))
tcp    ESTAB      0      0            127.0.0.1:38524         127.0.0.1:9090
    users:(("telnet",8664,3))
tcp    ESTAB      0      22           127.0.0.1:38526         127.0.0.1:9090
    users:(("telnet",8674,3))
tcp    ESTAB      0      22           127.0.0.1:38525         127.0.0.1:9090
    users:(("telnet",8669,3))
tcp    ESTAB      0      22           127.0.0.1:38529         127.0.0.1:9090
    users:(("telnet",8689,3))

$ sudo strace -s 2000 -p 8659
Process 8659 attached
select(4, [0 3], [], [3], NULL


On Wed, Aug 20, 2014 at 12:41 AM, Roberto De Ioris <[email protected]> wrote:

>
> > I understand that it accepts because the other requests are finished.
> >
> > What I don't understand is the role of the queue size. I can put 2 or
> 100,
> > I'll have the same behavior. The connection will be accepted and the
> > client
> > will sit there waiting
>
>
> This can happens only if tcp_defer_accept is enabled (or you have some
> proxy before uWSGI accepting requests), otherwise you can enqueue upto
> listen_queue + X requests.
>
> You could strace telnet too, to better check, and eventually you can check
> the sockets status with the 'ss' command (if i rememebr correctly it is
> part of the iproute2 suite)
>
>
>
> --
> 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