Re: apache problems with number of cgi requests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Apache does not process them concurrently but serially all of them go
to completion .( no error code etc..)
One request runs , other requests wait to get processed, and so on.

while i try mod_status  to check ExtendedStatus

I have been able to simplify our problem as below.
Just put test.cgi and sleep.cgi in your cgi path and launch test.cgi in apache.

test.cgi just presents a link to sleep.cgi which sleeps for 60 seconds.
No matter how many times I launch this link in a new tab/windown in a browser

when I do a

ps -ef | grep sleep.cgi

on the webserver box, I just see one process and later when this
finishes(after a min ) its still just one perl process running
sleep.cgi ( a
different pid ) while other requests for sleep.cgi on the browser are waiting.

On checking pstack I see apache children waiting on accept()
multiple tabs in the browser are launched and waiting ,  but apache is
not handling more than one cgi requests at a time.

Scripts for perusal below

== Test.cgi==
#!/usr/bin/perl
print "ContentTyep: text/html\n\n";
pringt << EOF
<html>
<br>
<a href="http://localhost/cgi-bin/reports/sleep.cgi>Launch the sleep CGI<\a>
<br>
<html>
EOF
==

== Sleep.cgi ==
#!/usr/bin/perl
sleep(60);
==


On Wed, Jul 29, 2009 at 8:52 AM, Chandranshu .<chandranshu@xxxxxxxxx> wrote:
> Hi Digz
>
> Meanwhile, when you say that "apache will not service any other CGI
> requests", what exactly do you mean? Did you mean that your further HTTP
> requests returned with 503 or some other error code? Or do they just wait
> around for a long time before returning any data?
>
> You should enable mod_status with "ExtendedStatus On" and check whether your
> requests are taken up for processing by the httpd server. Please send the
> output generated by mod_status along with the apache config if your problem
> remains unsolved.
>
> Best of Luck
> Chandranshu
>
> On Wed, Jul 29, 2009 at 5:41 PM, Digvijoy Chatterjee <digvijoy.c@xxxxxxxxx>
> wrote:
>>
>> Hi,
>>
>> We are running apache 2.0.35 on RHEL4 running in prefork mode.
>> Its a standard apache configuration for running cgi scripts. I can
>> send it if required
>>
>> The behaviour we are observing with apache is after servicing 2 cgi
>> requests which (do a long database lookup ~5 minutes)
>> apache will not service any other cgi requests until one of the above come
>> back.
>>
>> I have tried using RLimitNPROC, RlimitCPU , and RLimitMEM and even set
>> them to max,
>> but it does not affect the behavior.
>>
>> apache runs as www.
>>
>> Any clues ?
>>
>> --Digz
>>
>> ---------------------------------------------------------------------
>> 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@xxxxxxxxxxxxxxxx
>>   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
>> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>>
>
>

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux