httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samarjit adhikari <>
Subject [users@httpd] Apache 2.x server is taking too much time to sending response to the client.
Date Sat, 03 Mar 2007 18:57:14 GMT
Hi  All,

Problem Description:


I have written a cgi script which does 

 i) fork  and exec a command with the child process

ii) create pipe 

to read some data from the child process. The parent process waits untill it reads complete
data from the child.

observation from the packet capture:


 i) IE is sending GET request with the CGI binary name  in the URL

       i.e. GET /XXXX/<cgi-binary> say at the time T

ii) The response came from the server at the time (T+300) sec.

observation from the "top" command in the server side.


i)  Immediately the cgi-binary goes into "zimbie" state  consuming 0.3% of the CPU.

ii) The child process which is being created from the parent cgi-binary goes into "sleeping"
state consuming 0.5% of CPU.

ii) After 300 sec the parent cgi-binary exited and the response sent to the client.

Which httpd server version was tried:


The same binary works perfectly in the httpd version 1.3.33.

The same binary does not work in the httpd version 2.0.48 and 2.0.59

I am attaching "httpd.conf " for the version 2.0.59.

Search result on the Web:


A bug(id 23911) in the apache version 2.0.54 exists due to which a CGI binaries goes into
zombie state in some scenario. I have looked in to the following URL

The problem can be reproduced with the sample program also.
Sample program:
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
    int             pid;                    /*child ID*/
    int             ret_stat;

    if(pid!=0)      /*PARENT*/
        printf("Content-type: text/html\n\n");
        printf("<h1>PARENTAL ZOMBIES 3</h1>\n");
    {               /*CHILD*/

I am not sure ,whether it is a configuration issue or any other. Any  pointer on this issue
will help me a lot.

With regards,


Yahoo! India Answers: Share what you know. Learn something new
View raw message