I am trying to run a Perl CGI script (named script.cgi) on apache2 server but after executing two or three commands, it stops with errors in the log file:
"AH01215: Fatal Error:: /usr/lib/cgi-bin/script.cgi"
"AH01215: Program halted !!: /usr/lib/cgi-bin/script.cgi"
It successfully executes the first three external commands mentioned in the script but fails at the fourth one as it takes more time in generating complete results. I also tried printing the output of the command so that I could know whether the command is being executed or not, and I found that it is being executed but getting failed after a specific period of time.
I tried using Time::Out module but it is not working either. The external commands are being executed in backticks(``) because the system() is not capturing output and exec() does not wait for the command to finish and starts executing the next command.
Is there any way I could modify the timeout settings in apache2? Because I tried that too but I couldn't find any file or mod for this purpose. Please help me out.
In httpd.conf there is a Timeout directive. It usually defaults to 60 seconds.