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
Post a Comment