[FASTCGI] lighttpd+fastcgi: the process of test.fcgi will become zombie( <defunct>).
liangcheng001 at hotmail.com
Mon Nov 1 12:48:21 EDT 2010
Thanks for reply.
The header is not problem. The web page is good.
make it clear. suppose the data will be reload every 120 seconds, then, during this 120 seconds there is no problem at all. the problem which is the process became the zombie only happen when timer(Alarm) is triggered.
From: chapmanm at pixia.com
To: liangcheng001 at hotmail.com; fastcgi-developers at mailman.fastcgi.com
Subject: RE: [FASTCGI] lighttpd+fastcgi: the process of test.fcgi will become zombie( <defunct>).
Date: Mon, 1 Nov 2010 10:31:20 -0600
I don’t know if this is your problem, but whenever fastcgi
creates zombies for me it’s usually because my code is not sending back
the correct http headers for the http response like content-type,
content-length, etc plus two carriage returns at the end of the headers.
I believe the process zombies because mod_fcgid won’t do anything until
it gets the headers. Check your code and make sure headers are being
fastcgi-developers-bounces+chapmanm=pixia.com at mailman.fastcgi.com
[mailto:fastcgi-developers-bounces+chapmanm=pixia.com at mailman.fastcgi.com] On
Behalf Of CHENG LIANG
Sent: Monday, November 01, 2010 10:24 AM
Subject: [FASTCGI] lighttpd+fastcgi: the process of test.fcgi will
become zombie( <defunct>).
I have the problem for fastcgi and I can not figure out the
I wrote fast cgi process in C using fcgi_stdio package under
lighttpd under linux 2.6.31. Suppose we call this fastcgi process as test.fcgi.
In the test.fcgi, I need periodically load some data into the memory (suppose
it is function data_load()) and I create a thread for it using pthread library
because I do not want to interrupt the service from test.fcgi. And the data in
memory is in the hash table which I use implementation from GLIB.and I use
Alarm signal in the test.fcgi to set up a timer to trigger the event to load
data into memory. The problem I have is that every time when Alarm signal send
to test.fcgi, the process of test.fcgi will become zombie( <defunct>).
The following tests have been done and I still have no idea
what is root cause.
Remove the pthread_create call and directly call function
data_load(), the problem still there.
Using different way to set up a timer, like, using function
alarm(), or using function setitimer(), the problem still there.
And if I do not operate memory in the function data_load(),
for example, make function data_load() empty, then the problem is gone.
>From the error.log of lighttpd, when test.fcgi becomes defunct,
there is no any message in it and after that, when I issue http request to the
test.fcgi service, I will have the following message in the error.log and new
process of test.fcgi will be created.
2010-11-01 12:09:23: (mod_fastcgi.c.1768) connect failed:
Connection refused on unix:/tmp/fastcgi.socket-0
2010-11-01 12:09:23: (mod_fastcgi.c.2956) backend died;
we'll disable it for 5 seconds and send the request to another backend instead:
reconnects: 0 load: 1
2010-11-01 12:09:23: (mod_fastcgi.c.2722) child signaled: 11
Since the signal 11 is SIGSEGV, so it looks like to me that
the problem is memory access in function data_load(). Is this idea making
Thanks a lot for any help.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the FastCGI-developers