Google Cloud PHP Curl timeout

295 views
Skip to first unread message

Thomas Magnano

unread,
Jan 19, 2017, 6:17:01 PM1/19/17
to gce-discussion
Hi,

I met this error sometimes on some CURL requests done (adding CURL options directly in the PHP like CURLOPT_TIMEOUT change nothing, and i use SDK for most of them...) :

Operation timed out after 0 milliseconds with 0 out of 0 bytes received


The "0 milliseconds" is always here, never more. Seems like an "internet down" and so, URL are unreachable.

Any idea about a possible configuration to do maybe ?

Thanks !

Carlos (Cloud Platform Support)

unread,
Jan 20, 2017, 4:37:19 PM1/20/17
to gce-discussion

I would suggest trying to isolate the issue. For example, assuming that the server you are trying to reach is on GCE and your PHP application is outside of GCP, You can parallel run the application on GCE and compare the results. In that way you discard the network elements outside Google.


You might also want to check that you are not running out of resources in the machine where the PHP application is running  or the one that is serving the requests.


Finally, to discard that it is not an issue related to your PHP configuration, you can also try to log and curl via a Linux script. Then you can compare results.  By the way, you can find here a discussion on PHP curl timeouts.


Reply all
Reply to author
Forward
0 new messages