The server encountered an internal error or misconfiguration... How to solve this problem?

May 15, 2014 18.5k views
Hi, My system config - LAMP stack with centos 6. I am sending emails through smtp by mandrill to about 5k users. When I send after a while it my script (script is a PHP script) gives me this error The server encountered an internal error or misconfiguration and was unable to complete your request. "Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log." In apache error log file i get this error "mod_fcgid: read data timeout in 31 seconds" I have put set_time_limit (300); to increase the execution time limit for the script, but the same error. Please help , how can I solve this problem Thanks in advance.
1 comment
3 Answers
The maximum time limit in php.ini does not have any effect on FastCGI, you need to modify fastcgid.conf and change the 'FcgidIOTimeout' to a higher value.
Thanks for your reply.
I think this will change the maximum time limit for every script.
Is there any way to change the maximum time limit for some scripts or on run time?

Thanks for your help
@hypersol: You should be able to do that using a FcgidCmdOptions directive. Check out:
Have another answer? Share your knowledge.