Fatal error: Uncaught exception 'Guzzle\Http\Exception\CurlException' with message '[curl] 56: Recv failure: Connection reset by peer [url]

3,547 views
Skip to first unread message

Igor Kiselyov

unread,
Nov 26, 2013, 4:33:41 AM11/26/13
to guz...@googlegroups.com
Hello.
sometimes (randomly) i get this error and my script STOPS.

$request=$client->get("https://xxxxx.com/?xxx=yyyy");

Fatal error: Uncaught exception 'Guzzle\Http\Exception\CurlException' with message '
[curl] 56: Recv failure: Connection reset by peer
in /var/www/xxxxxx/data/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMulti.php:338 
Stack trace:
#0 /var/www/xxxx/data/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMulti.php(279): Guzzle\Http\Curl\CurlMulti->isCurlException(Object(Guzzle\Http\Message\Request), Object(Guzzle\Http\Curl\CurlHandle), Array) 
#1 /var/www/xxxx/data/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMulti.php(244): Guzzle\Http\Curl\CurlMulti->processResponse(Object(Guzzle\Http\Message\Request), Object(Guzzle\Http\Curl\CurlHandle), Array) 
#2 /var/www/xxxxx/data/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMulti.php(227): Guzzle\Http\Curl\CurlMulti->processMessages()
#3 /var/www/xxxxx/data/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMulti.php(211): Guzzle\Http\Curl\CurlMulti->executeHandles() 
#4 /var/www/xxxxx/dat in /var/www/xxxxxx/data/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMulti.php on line 338

im using verify and also proxies.

How to avoid this? 
$client->getEventDispatcher()->addListener('request.error', function (Event $e) {$e->stopPropagation();}); DOESNT HELP
how to dispatch curl fails and just ignor them?

Thanks


Carlton Dickson

unread,
Dec 2, 2013, 12:41:55 PM12/2/13
to guz...@googlegroups.com
I also have a similar issue and would like to know how to recover from this 

Michael Stramel

unread,
Dec 10, 2013, 4:56:13 PM12/10/13
to guz...@googlegroups.com
I am not sure of how much effort you put into researching the issue but by doing a simple google of "Conenction reset by peer cURL" and the first link provided very detailed information into possible issues and some solutions to each issue. 

Try this link to see if it helps resolve some issues.

Greg Knapp

unread,
Jan 8, 2014, 12:18:14 PM1/8/14
to guz...@googlegroups.com
I'm having the same issue at the end of my unit tests. Looks like guzzle's shutdown function tries to tell the node server to stop but it's already gone.


On Tuesday, 26 November 2013 09:33:41 UTC, Igor Kiselyov wrote:

Michael Dowling

unread,
Jan 8, 2014, 12:32:51 PM1/8/14
to guz...@googlegroups.com
Gregg,

Is this issue happening using the latest version of Guzzle? I made a fix specifically for that error.

Thanks,
Michael
--
You received this message because you are subscribed to the Google Groups "Guzzle - PHP HTTP client and REST client framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to guzzle+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Greg Knapp

unread,
Jan 9, 2014, 6:37:58 AM1/9/14
to guz...@googlegroups.com
Hi Michael,

I installed guzzle via composer just yesterday, my require line:

"guzzle/guzzle": "3.8.*@dev"

I could gist you my unit test (~70 lines) if it'd help?

Thanks, Greg
Reply all
Reply to author
Forward
0 new messages