Curl Error 28 Operation Timed Out After 30000 Milliseconds
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have operation timed out after 0 milliseconds with 0 out of 0 bytes received paypal Meta Discuss the workings and policies of this site About Us operation timed out after milliseconds with 0 bytes received Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with curl "operation timed out after" milliseconds us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just
Operation Timed Out After 100000 Milliseconds With 0 Bytes Received
like you, helping each other. Join them; it only takes a minute: Sign up Curl error: Operation timed out up vote 1 down vote favorite I have the following fatal error when trying to use Curl: PHP Fatal error: Uncaught HTTP_Request2_MessageException: Curl error: Operation timed out after 30000 milliseconds with 0 bytes received in /usr/share/php/HTTP/Request2/Adapter/Curl.php on operation timed out after 30000 milliseconds with 0 bytes received line 200 Exception trace Function Location 0 HTTP_Request2_Adapter_Curl::wrapCurlError('Resource id #12') /usr/share/php/HTTP/Request2/Adapter/Curl.php:200 1 HTTP_Request2_Adapter_Curl->sendRequest(Object(HTTP_Request2)) /usr/share/php/HTTP/Request2.php:959< in /usr/share/php/HTTP/Request2/Adapter/Curl.php on line 172 However, I can't see how to best debug it. There's no reference to any line of code I've written, only the HTTP_Request2 and Curl modules. What's the best approach to try and resolve this? php curl share|improve this question asked Feb 1 '14 at 17:25 alias51 1,878103383 have you tried debugging before and after the statements in your code that actually make the curl commands? try and find the offending request that way? from there you can try it command line, with the -v switch, and try and get more info that way. possibly the URL has now 404'd. –thescientist Feb 1 '14 at 17:30 add a comment| 1 Answer 1 active oldest votes up vote 8 down vote Your curl gets timed out. Probably the url you are trying that requires more that 30 seconds. If you are running the script through browser, the
Support Search GitHub This repository Watch 385 Star 3,697 Fork 1,304 curl/curl Code Issues 33 Pull requests 29 Projects curl operation timed out after 0 milliseconds 0 Wiki Pulse Graphs New issue Operation timed out after 0
Curl Resolving Timed Out After
milliseconds with 0 out of 0 bytes received #619 Closed dan-cristian opened this Issue Jan 27, 2016
Increase Curl Timeout
· 13 comments Projects None yet Labels needs-info-or-update Milestone No milestone Assignees No one assigned 5 participants dan-cristian commented Jan 27, 2016 I use CURL to perform upload/download http://stackoverflow.com/questions/21501159/curl-error-operation-timed-out operations via HTTP from an openstack Swift server (www.hubic.com). I get random errors "Operation timed out after 0 milliseconds with 0 out of 0 bytes received" both on HTTP PUT and GET operations. After several retries it will eventually work. The message seems to be incorrect as the timeout is set to 20 ms. Can someone confirm https://github.com/curl/curl/issues/619 if this timeout occurs in the SSL handshake? If yes, are there any other curl flags I can use to increase connection reliability? The code excerpts and some debug data can be found below. Code extras curl_easy_setopt(curl, CURLOPT_URL, url); curl_easy_setopt(curl, CURLOPT_HEADER, 0); curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1); curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0); curl_easy_setopt(curl, CURLOPT_USERAGENT, USER_AGENT); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 1); curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 20); curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); curl_easy_setopt(curl, CURLOPT_TCP_NODELAY, 1); curl_easy_setopt(curl, CURLOPT_UPLOAD, 1); curl_easy_perform(curl); Debug output CURL version=7.38.0 ssl=OpenSSL/1.0.1k [2016-01-27 23:18:37.]:26085==adding extra header: X-Copy-From: /default_fuse_segments/default/test/t2_segments/medium.txt/1453929407.883449/00000003 [2016-01-27 23:18:37.]:26085==adding extra header: Content-Length: 0 Hostname was found in DNS cache Trying 46.105.173.106... TCP_NODELAY set Connected to lb1.hubic.ovh.net (46.105.173.106) port 443 (#50) successfully set certificate verify locations: CAfile: none CApath: /etc/ssl/certs SSL re-using session ID Operation timed out after 0 milliseconds with 0 out of 0 bytes received Closing connection 50 curl member jay commented Jan 27, 2016 Though this report seems to have some merit for the incorrect timeout message please note this is an issue tracker and in any other case your questions should
past few weeks, but since last week, i always receive "Operation timed out after 30000 milliseconds with 0 bytes received". This look like an error generated by tmhoauth.php when it doesn't receive https://twittercommunity.com/t/operation-timed-out-after-30000-milliseconds-with-0-bytes-received/11804 any answer from the API after the timeout has been reached. I've try putting the timeout way higher and i still receive the same error. I'm just wondering if there's anything on twitter side that could cause this issue, but i guess this would have been reported already ... Just let me know where i can start to debug this! thanks, episod 2013-08-19 15:07:58 UTC #2 Are timed out you on shared hosting? Sometimes IP addresses get temporarily blacklisted in response to abuse. ThatG33k 2013-08-19 15:13:44 UTC #3 I'm not, i'm on a dedicated server! I modified my script so it automatically retry on failure, and it can sometime takes up to 20 tries before it goes through. So the code is working fine, but it seems like the API isn't answering back most of the timed out after time! ThatG33k 2013-08-19 17:21:00 UTC #4 I did a few tests under different classes (all PHP using cURL) and they all have the same issues, please note that using 1.1/statuses/update is working 100% of the time, but as soon as i add media, with 1.1/statuses/update_with_media it won't go through. episod 2013-08-19 17:35:16 UTC #5 OK, that rules out IP address blacklisting I think. When you say you retry on failure -- do you do so aggressively or are you using some kind of more exponential backoff? I know of some issues some developers have when uploading media -- what HTTP headers are you sending when you're making such a request? mnicolas80 2013-08-19 18:01:00 UTC #6 Hello,I am using Abraham Williams php code (https://github.com/abraham/twitteroauth) which was working perfectly,even after the API update from 1 to 1.1.Suddenly, the last days I rechecked the "update_with_media" method, which does not work (and it used to work). The code is the following:
$tweet->post('https://api.twitter.com/1.1/statuses/update_with_media.json',
array(
'media[]' => "{$image};type=image/jpeg;filename={$filename}",
'status' => "my message"),
true,
true);
It is the same code, I m using the last 3 months.Any idea?Thank you ThatG33k 2013-08-19 18:27:00 UTC #7 Hi @episod, first thanks for answering. My retries are done one every 30 sec