httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Byron Albert <balb...@mail.ifip.com>
Subject Re: [users@httpd] apache 1.3.27 cgi's getting stuck
Date Fri, 25 Apr 2003 15:40:09 GMT
Think you miss understood what's happening.

What seems to be happening is the remote browser hangs up the connection 
but the cgi still has more data to send. So what should happen is the 
http process sees the connection is dead kills its sibling cgi process 
and moves onto the next request. But what seems to be happening is the 
http process doesn't kill the cgi so both sit in a wait state waiting 
for the socket to reopen. After doing another trace it seems like apache 
is sending the cgi a sigstop, i would thing it should send it a sigterm.


Here is the output of a pstree with apache running for about 12 hours
      |-httpd-+-133*[httpd---index.cgi]
      |       |-267*[httpd---download-sw.cgi]
      |       |-11*[httpd---search-software]
      |       |-2*[httpd---search-boards.p]
      |       |-httpd---add-user-opinio
      |       |-5*[httpd---recommend.cgi]
      |       |-5*[httpd---delpost.pl]
      |       |-593*[httpd]
      |       |-3*[httpd---admin-articles.]
      |       `-httpd---developers-sw.p

Most of the cgis have been running for many hours

After a kill -HUP
pstree is clean with 594 processes running.
      |-httpd-+-594*[httpd]


Byron



Boyle Owen wrote:
>>-----Original Message-----
>>From: balbert@mail.ifip.com [mailto:balbert@mail.ifip.com]
>>
>> I am having some problems with perl cgi's getting suck. Basically 
>>after doing some straces what seems to be happening is that the remote 
>>socket is no longer connected but the cgi has not finished so 
>>as it sits 
>>in  state trying to pass data back to the socket causing it to just 
>>hang. 
> 
> 
> Apache will not wait forever for a CGI to execute. I was going to
> suggest altering the "TimeOut" directive which (I thought) sets the
> limit on the time apache will wait for a CGI to return. However, on
> re-reading the docs, I'm now a little uncertain. The docs say:
> 
> "The TimeOut directive currently defines the amount of time Apache will
> wait [...] to receive a GET request." 
> 
> That strikes me as a little ambiguous. Apache receives GET requests from
> the client so this seems to mean that if apache doesn't get any requests
> from the web, it times out! I rather think it means:
> 
> "The TimeOut directive currently defines the amount of time Apache will
> wait [...] to receive a the results of a GET request from the local OS."
> 
> Anyway, you could try a larger TimeOut, and/or adjusting the CGI so that
> it feeds back a line or two of HTML every few seconds while it is
> executing so that apache knows that something is happening.
> 
> By the way, am I correct in understanding that it is the CGI process
> which hangs and not apache?
> 
> Rgds,
> Owen Boyle
> Disclaimer: Any disclaimer attached to this message may be ignored. 
> 
> 
>>Over time this starts to cause major problems as in 
>>about an hour 
>>i have ~200 apache processes in this state and if I don't HUP 
>>the server 
>>It can acutely take over all available processes.  I have tried 
>>different perl versions etc. with no effect. Any help would be 
>>appreciated.
>>
>>
>>Thanks
>>Byron
>>-- 
>>---------------------------------------------------------------
>>-----------------
>>Byron Albert 		balbert@jupitermedia.com
>>System Engineer		Jupitermedia Corp.
>>
>>
>>---------------------------------------------------------------------
>>The official User-To-User support forum of the Apache HTTP 
>>Server Project.
>>See <URL:http://httpd.apache.org/userslist.html> for more info.
>>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>  "   from the digest: users-digest-unsubscribe@httpd.apache.org
>>For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
> 
> 
> This message is for the named person's use only. It may contain
> confidential, proprietary or legally privileged information. No
> confidentiality or privilege is waived or lost by any mistransmission.
> If you receive this message in error, please notify the sender urgently
> and then immediately delete the message and any copies of it from your
> system. Please also immediately destroy any hardcopies of the message.
> You must not, directly or indirectly, use, disclose, distribute, print,
> or copy any part of this message if you are not the intended recipient.
> The sender's company reserves the right to monitor all e-mail
> communications through their networks. Any views expressed in this
> message are those of the individual sender, except where the message
> states otherwise and the sender is authorised to state them to be the
> views of the sender's company. 
> 
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message