Apache timeout on external command
- From: Ian Petts <ipetts@xxxxxxxxx>
- Date: Wed, 14 May 2008 20:11:16 -0500
We have a Solaris 9 server running apache 2.0.53.
I have written a custom Perl cgi script to act as a front-end for a
command-line application on a remote server. The Perl script connects
via ssh to the remote box, runs a command, parses the output and
presents a table to the user with various information about the host.
The host in question is under heavy load and can take anywhere from 20
seconds to about two minutes to complete the command. Every time I run
the command manually from the command line (ssh user@host 'command with
arguments') it eventually returns the expected data, but when running as
part of the cgi script it appears that apache often gives up waiting for
the script to complete and simply stops sending any data back to the
client. The remainder of the Perl script (following the ssh call) does
not get run, but doing a process search on the remote host I can see the
remote command still running to completion after apache has apparently
given up. It seems that if the remote command finishes within 20-30
seconds then the script completes just fine, but if it takes any longer
apache closes the connection to the client browser without letting the
script finish.
I have checked the error log debug entries and can see no difference
between a successful run of the script verses an unsuccessful run, apart
from the length of time reported.
I know the version of apache we are running is quite old, but upgrading
it is not a priority at this time especially since it is an internal
admin server and not publicly accessible.
Can someone please point me at the correct configuration option or other
info to correct this?
Thanks,
Ian.
.
- Follow-Ups:
- Prev by Date: Apache 2.2.8 on NetBSD 4.0 serves nothing or garbled directory listings
- Next by Date: apache webdav ldap auth question
- Previous by thread: Apache 2.2.8 on NetBSD 4.0 serves nothing or garbled directory listings
- Next by thread: Re: Apache timeout on external command
- Index(es):
Relevant Pages
|