movieprodw
asked on
Server PHP script timeout 500 error
Hello,
I have a php script that crawls a bunch of websites for new jobs, curl.
I am getting a timeout for a couple job titles as there are a lot of them on the other websites.
The only function of the server is to find these jobs so I am not concerned about the length of the script running.
I have tried to edit the fcgid module but it still times out around 9 minutes... any where else you suggest or anything you see here?
I have a php script that crawls a bunch of websites for new jobs, curl.
I am getting a timeout for a couple job titles as there are a lot of them on the other websites.
The only function of the server is to find these jobs so I am not concerned about the length of the script running.
I have tried to edit the fcgid module but it still times out around 9 minutes... any where else you suggest or anything you see here?
# This is the Apache server configuration file for providing FastCGI support
# via mod_fcgid
#
# Documentation is available at http://fastcgi.coremail.cn/doc.htm
LoadModule fcgid_module modules/mod_fcgid.so
<IfModule mod_fcgid.c>
<IfModule !mod_fastcgi.c>
AddHandler fcgid-script fcg fcgi fpl
</IfModule>
FcgidIPCDir /var/run/mod_fcgid/sock
FcgidProcessTableFile /var/run/mod_fcgid/fcgid_shm
FcgidIdleTimeout 40
FcgidProcessLifeTime 1200
FcgidMaxProcesses 40
FcgidMaxProcessesPerClass 8
FcgidMinProcessesPerClass 0
FcgidConnectTimeout 1200
FcgidIOTimeout 1200
FcgidInitialEnv RAILS_ENV production
FcgidIdleScanInterval 10
</IfModule>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hello,
Okay, I will try this out, it is a bummer you can not just set a timeout, it times out at 7 minutes ~420 seconds no matter what I set the max at.
Matt
Okay, I will try this out, it is a bummer you can not just set a timeout, it times out at 7 minutes ~420 seconds no matter what I set the max at.
Matt
ASKER
You still didn't mention the httpd.conf Timeout setting.
ASKER
#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 60
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 60
Can you try Timeout 600 (restart httpd) and see if it gets better?
ASKER
Worked, thanks
What was the solution then?
max_execution_time (in seconds)
and also apache's httpd.conf parameter TimeOut (in seconds)
Or you should just run the script from commandline instead of web interface