Hi,
     This is my setup details.

Cherokee Web Server 0.99.15

PHP 5.2.10 (cgi-fcgi) (built: Sep  2 2009 09:59:42)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

Snapshot of FCGI configuration in cherokee.conf :
source!1!env!PHP_FCGI_CHILDREN = 10
source!1!env!PHP_FCGI_MAX_REQUESTS = 500
source!1!host = /tmp/cherokee-php.socket
source!1!interpreter = /usr/local/third-party/php/bin/php-cgi -c /etc/php.ini -b
 /tmp/cherokee-php.socket


After pumping web traffic accessing php pages for couple of hours , i see that 
that all php-cgi processes go into recv state and blocked there.
Since all of them are blocked on recv , cherokee not able to spawn new php-cgi 
and all new requests are throwing "504 gateway error".

GDB trace of one of the php-cgi process:
Loaded symbols for /lib32/libnss_files.so.2
0x2c85b0a8 in __libc_recv (fd=4, buf=0x7fa12890, n=8, flags=0)
    at ../sysdeps/unix/sysv/linux/x86_64/recv.c:30
30      ../sysdeps/unix/sysv/linux/x86_64/recv.c: No such file or directory.
        in ../sysdeps/unix/sysv/linux/x86_64/recv.c
(gdb) bt
#0  0x2c85b0a8 in __libc_recv (fd=4, buf=0x7fa12890, n=8, flags=0)
    at ../sysdeps/unix/sysv/linux/x86_64/recv.c:30
#1  0x102e2fb0 in fcgi_finish_request (req=0x7fa22c78)
    at /root/php-5.2.10/sapi/cgi/fastcgi.c:901
#2  0x102e3a18 in fcgi_accept_request (req=0x4)
    at /root/php-5.2.10/sapi/cgi/fastcgi.c:915
#3  0x00000010 in ?? ()
warning: GDB can't find the start of the function at 0x10.

I had a look at the php's sapi/cgi/fastcgi.c  and below  are the lines from the 
function fcgi_close , it boils down to ,

            if (!force) {
                        char buf[8];

                        shutdown(req->fd, 1);
                        while (recv(req->fd, buf, sizeof(buf), 0) > 0) {}
                }

It looks like after the shutdown its waiting for some message from the other 
side, it it does not receive it then it would basically block .
Not sure why its not receiving anything.

Any help is appreciated .


Regards
swami
_______________________________________________
Cherokee mailing list
[email protected]
http://lists.octality.com/listinfo/cherokee

Reply via email to