Apache takes 20 seconds to run a CGI script

Any ideas as to why my Apache / 2.0.49 server always waits 20 seconds from receiving a request that is executed using a cgi-bin script to run this script?

The server immediately responds to normal HTTP requests that use only static files, but cgi-bin requests always take 20 seconds to complete. I used tcpdump at the time the request arrived and printed the time at the beginning of the script to determine that the delay was between the two events.

I do not see anything in the configuration related to 20 seconds. Red Hat Linux 3.3.3-7 is running on the server, and I'm sure it responded immediately to the cgi scripts, but not sure when it started slowly and what could change to cause this.

Thanks in advance for any help / suggestions you can provide.

+4
source share
1 answer

We had a similar problem with our Apache server working with PHP, but only with a specific client, in the end it turned out that the problem was that PHP was trying to extract the file from a remote server, but could not connect after 20 seconds, when PHP "gave up" and the stream was completed. You should try to find your code for something similar.

+1
source

All Articles