Mailing List Archive

Re: SLOOOOOOW CGI includes in Apache?
I think I've seen this, but it didn't register at the time...

dave@west.net (Dave) in comp.infosystems.www.servers.unix wrote:

>I'm now running Apache 0.8.10 under Solaris on a Sparc20, and I'm
>seeing that CGI's and shell commands executed from a parsed HTML file take
>about a full second to finish their output, while if they are called in the
>URL directly they are essentially instantaneous.
>
>Is there a problem with IncludeExec output not getting flushed until the
>CGI times out? Rather extreme if you have several includes in the same
>page. The following takes about eight seconds:
>
><HR>
><!--#exec cgi="/cgi-bin/date"-->
><HR>
><!--#exec cgi="/cgi-bin/date"-->
><HR>
><!--#exec cgi="/cgi-bin/date"-->
><HR>
><!--#exec cgi="/cgi-bin/date"-->
>
>Ouch! My users are starting to complain.
>
>Help?
>
>--
>------------------------------------------------------------------------
>David Carmean WB6YZM DC574 dave@west.net
> WestNet Communications, Inc. (805)892-2133 (805)289-1000
>PGP Key Fingerprint: CD 1C C1 15 3E E3 1D 41 ED C2 3E A8 D6 29 BD C4
>------------------------------------------------------------------------
Re: SLOOOOOOW CGI includes in Apache? [ In reply to ]
At 11:42 AM 8/21/95, Robert S. Thau sez:

> I haven't seen this with the scripts in my includes test page, but I
> tried the code the guy sent, and sure 'nuff, I *do* see it with /cgi-bin/date.
> There's something fishy going on here...

Fishy? It works fine under A/UX... (no delays) hey, at least something
works better here...

-ech

______________________________________________________
Eric Hagberg Phone: 212-746-6387
User Services Manager, CUMC/OAC Fax: 212-746-8161
Re: SLOOOOOOW CGI includes in Apache? [ In reply to ]
> I haven't seen this with the scripts in my includes test page, but I
> tried the code the guy sent, and sure 'nuff, I *do* see it with /cgi-bin/date.
> There's something fishy going on here...


I think I've seen someone report a similar problem with 0.6.x


It could be that the Apache is to quick :-) it's sending a SIGTERM
to the process before it has had a chance to shutdown on its own,
so

/* Subprocess may be dead already. Only need the timeout if not. */
if (kill (p->pid, SIGTERM) != -1)
need_timeout = 1;

will always have kill return 0 (if Apache is too quick), and we
then need a sleep.

When I commented out the sleep(3), my CGI include worked promptly. With
the sleep(3) I see the same delay.


rob
Re: SLOOOOOOW CGI includes in Apache? [ In reply to ]
I haven't seen this with the scripts in my includes test page, but I
tried the code the guy sent, and sure 'nuff, I *do* see it with /cgi-bin/date.
There's something fishy going on here...

rst