Max time to wait for response from CURL request - php -


i'm executing curl request api regularly times out 504 error. main problem 504 takes 60 seconds respond. i'd set max time wait before moving onto other processes 504 doesn't slow else down, know way php , curl, i've tried following time related options (last 2) within curl option settings:

// set curl options         curl_setopt($ch, curlopt_httpheader, $headr);         curl_setopt($ch, curlopt_url, $url);         curl_setopt($ch, curlopt_verbose, true);         curl_setopt($ch, curlopt_followlocation, true);         curl_setopt($ch, curlopt_header, 1);         curl_setopt($ch, curlopt_returntransfer, 1);  // set curl time options         curl_setopt($curl, curlopt_timeout_ms, 2000); //in miliseconds         curl_setopt($curl, curlopt_connecttimeout_ms, 500); //in miliseconds 

however timeout , connecttimeout don't seem trick. else have suggestions?

thanks,

matt


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -