I’ve got a self-written FastCGI backend. It works with Lighttpd, but not
with Nginx. Nginx connects to the backend, sends the request, receives
the response, but then appears to wait on something else.
The backend writes one or more FCGI_STDOUT packets and a
FCGI_END_REQUEST packet. Any hints on what’s wrong?
On Tue, Jan 25, 2011 at 04:38:31AM -0500, Olaf van der Spek wrote:
I’ve got a self-written FastCGI backend. It works with Lighttpd, but not
with Nginx. Nginx connects to the backend, sends the request, receives
the response, but then appears to wait on something else.
The backend writes one or more FCGI_STDOUT packets and a
FCGI_END_REQUEST packet. Any hints on what’s wrong?
Most likely your backend doesn’t honor FCGI_KEEP_CONN flag.
On Tue, Jan 25, 2011 at 07:52:18AM -0500, Olaf van der Spek wrote:
Maxim D. Wrote:
Most likely your backend doesn’t honor
FCGI_KEEP_CONN flag.
It doesn’t. Why does Nginx wait after FCGI_END_REQUEST though?
nginx doesn’t process data from fastcgi app untill buffer filled or
connection closed by app (as required per spec without
FCGI_KEEP_CONN flag set).
I’ve posted some patches which change things as part of keepalive
with backends work, but most likely you don’t want to rely on
them. You may want to make your app actually fastcgi complaint
instead.
nginx doesn’t process data from fastcgi app untill
buffer filled or
connection closed by app (as required per spec
without
FCGI_KEEP_CONN flag set).
What part of the spec requires the webserver to wait until the
connection is closed by the backend?
Doesn’t Nginx support (and use) persistent connections?
I’ve posted some patches which change things as
part of keepalive
with backends work, but most likely you don’t want
to rely on
them. You may want to make your app actually
Is there an bug/issue tracker that tracks this?
Posted at Nginx Forum:
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.