Il giorno 01/set/2011, alle ore 14:41, Evgeny Turnaev ha scritto:

> 
> it compiles perfectly and working..
> except nginx mail list said to me that "uwsgi protocol" (maybe he
> meant nginx uwsgi_module) does not support keepalive connections.


by default the uwsgi protocol can be streamed everywhere and in every way you 
want.
The main purpose for it containing the size in each packet is to allows 
persistent connection (even if not used).

the uwsgi_module in nginx (by default) does not support keepalive

> 
> i am testing this setup with simple wsgi app that yields some strings
> in a certain time interval and then
> returns.
> for every yield nginx in unbuffered mode produces http 1.1 chunk which
> is exactly what i want.

good, i hope igor will push the buffering/unbuffering patch soon

> i am just curious: does uWSGI server able to maintain persistent connection?

yes it is able but currently only with the zeromq handler, writing a persistent 
uwsgi handler (in proto/uwsgi.c) it is only a matter
of not closing the connection at the end. As no one is using it, i never 
implemented it.

I can give it a try adding a 'puwsgi' protocol handler. Take in account that 
async mode with persistent connections is broken, so you have to relay
on threads and processes.


> 
> what i did to test:
> i recorded wsgi request into file.. then started uwsgi with test application..
> then replayed wsgi req..
> for the first request uWSGI called application and returned response..
> then requesting process tried to send
> again recorded wsgi req into same socket from which it just read first
> response. and nothing happens.

that's because the uwsgi protocol handler close the connection after the WSGI 
callable returns.
> 
> so the main question: does uWSGI able to receive multiple request and
> process responses on the same socket without closing it ?
> 
> if yes.. then does nginx uwsgi module support it? and what i was doing wrong?

no the nginx  module does not support it :(

> 
> (also while i was compliling lighttpd with uwsgi.. i did not worked
> with latest lighttpd.. i think lighttpd changed api and renamed one
> function..)

i will check it, thanks


--
Roberto De Ioris
http://unbit.it
JID: [email protected]

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

Reply via email to