How does nginx know about FastCGI's stderr?

nginx’s error.log says:
2010/03/15 11:13:15 [error] 10978#0: *10642 FastCGI sent in stderr:
"PHP Deprecated: Function ereg() is deprecated in
/usr/local/cacti/lib/rrd.php on line 734
PHP Deprecated: Function ereg() is deprecated in
/usr/local/cacti/lib/rrd.php on line 1020

etc. But I don’t know how nginx knows about FastCGI’s stderr?


Ren Xiaolei

Hello!

On Mon, Mar 15, 2010 at 11:15:36AM +0800, 任晓磊 wrote:

nginx’s error.log says:
2010/03/15 11:13:15 [error] 10978#0: *10642 FastCGI sent in stderr:
"PHP Deprecated: Function ereg() is deprecated in
/usr/local/cacti/lib/rrd.php on line 734
PHP Deprecated: Function ereg() is deprecated in
/usr/local/cacti/lib/rrd.php on line 1020

etc. But I don’t know how nginx knows about FastCGI’s stderr?

http://www.fastcgi.com/devkit/doc/fcgi-spec.html

Maxim D.

On Mon, Mar 15, 2010 at 5:49 PM, Maxim D. [email protected]
wrote:

http://www.fastcgi.com/devkit/doc/fcgi-spec.html
Thank you, Maxim. The document above tells me the detail. I thought
the protocol is a couple of stdio pipes before read this.

So, could you tell me why I see 502 when something in FastCGI’s
stderr? Does texts from FastCGI’s stderr lead to 502 ? But the specs
says they’re just application-level errors.


Ren Xiaolei

Hello!

On Mon, Mar 15, 2010 at 08:56:11PM +0800, 任晓磊 wrote:

On Mon, Mar 15, 2010 at 5:49 PM, Maxim D. [email protected] wrote:

http://www.fastcgi.com/devkit/doc/fcgi-spec.html
Thank you, Maxim. The document above tells me the detail. I thought
the protocol is a couple of stdio pipes before read this.

So, could you tell me why I see 502 when something in FastCGI’s
stderr? Does texts from FastCGI’s stderr lead to 502 ? But the specs
says they’re just application-level errors.

Writing to stderr shouldn’t lead to 502 from nginx. This may
happen in two cases:

  1. Application actually dies (or aborts request) after writing to
    stderr.

  2. Bug in nginx. There is one known bug with fastcgi_cache and
    large stderr from fastcgi apps which may lead to 502 returned
    unexpectedly. It’s mostly fixed in 0.8.34, though fix may lead to
    segfaults in nginx worker when fastcgi_cache isn’t used, patch is
    here:

http://nginx.org/pipermail/nginx-ru/2010-March/032836.html

Maxim D.

On Mon, Mar 15, 2010 at 9:15 PM, Maxim D. [email protected]
wrote:

  1. Bug in nginx. Â There is one known bug with fastcgi_cache and
    large stderr from fastcgi apps which may lead to 502 returned
    unexpectedly. Â It’s mostly fixed in 0.8.34, though fix may lead to
    segfaults in nginx worker when fastcgi_cache isn’t used, patch is
    here:

http://nginx.org/pipermail/nginx-ru/2010-March/032836.html

Mostly like to be this.
OK, I’ll wait for next version in 0.7 series, and try. Sorry to not
helping because of my poor programming skill.

Ren Xiaolei

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs