php - Curl request Timeout -


I am currently facing a problem where my php file is running out of time. I believe this is due to my curl code which is:

  $ ch = curl_init ($ url); Curl_setopt ($ CH, CURLOPT_HTTPHEADER, $ headers); Curl_setopt ($ CH, CURLOPT_RETURNTRANSFER, 1); Curl_setopt ($ CH, CURLOPT_CONNECTTIMEOUT, 600); Curl_setopt ($ ch, CURLOPT_TIMEOUT, 600); $ Result = json_decode (curl_exec ($ ch));   

The file runs in the browser for 60 seconds and then returns with 500 internal server errors. I looked around and tried things like putting

  set_time_limit (0);   

at the top of the file but it still seems timeout always I am not very familiar with curls, so this is probably something wrong with me.

After checking the error_log on my server, I see the following error:

  mod_fcgid: Read data timeout in 45 seconds   

So I gave it time and it makes 500 error after 45 seconds.

Thanks

quoted from:

this error is Not specific to mod_fcgid, if you are using the current version of mod_fcgid, then you have to set FcgidIotimeout directive (referee) otherwise you will need old instructions, IPCCm timeout.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -