I'm an experienced software developer but this issue has me totally stumped. I have two Linux servers, one sitting in Virginia, one in Bangalore, India. Both are running "Red Hat Enterprise Linux ES release 4 (Nahant Update 4)" and apache 2.0.52. The problem is, on the machine in Bangalore a perl CGI script always times out after 300 seconds. Both systems have identical httpd.conf files (except ServerName) , both have the same tcp/ip settings (when I run /sbin/sysctl -a | grep net.inet.tcp I get the same results). I tried running httpd on the Bangalore system with -f /etc/httpd/conf/httpd.conf
to make sure it was picking up the "Timeout 5400" line in httpd.conf. I even put in both Timeout and TimeOut in the file just in case case matters.
The only difference between the two systems that I can tell is that one system is running a 32 bit compiled httpd and one a 64 bit binary. I've attached a simple CGI script. On the Virginia system, about 5 minute go by and then it reports "Slept 301 seconds". When I run the same CGI script on the Bangalore system, my browser waits forever. If I change it to sleep 299 seconds, it works. So somewhere something is timing out at 300 seconds, the question is what? My browser just sits there forever waiting for a response, and there is nothing unusual logged in the error_log or access_log to help me debug where the response is being dropped.
my $sleep_sec = 5 * 60 + 1;
print "Content-type: text/plain\n\n";
print "Slept $sleep_sec seconds\n";