Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

curl (56) Recv failure

Tags:

curl

recv

While running the command:

curl --head http://www.yourdomain.com/

on my local machine, I get this output:

HTTP/1.1 200 OK
Date: Sat, 31 Mar 2012 09:45:16 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Set-Cookie: ASP.NET_SessionId=p2mt4l553bti4x55geyiwiil; path=/; HttpOnly
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 14663

but on my live server, I just get:

curl: (56) Recv failure: Connection reset by peer

They are both using the same curl version (7.21.0) and for now, I am only getting this error for only one specific url.

How should I fix this?

like image 901
GRaecuS Avatar asked Nov 14 '22 07:11

GRaecuS


1 Answers

"Recv failure" means a recv() call failed within libcurl, which then indicates a network problem of some sorts. It is hard to be very specific on what you should do to track this down but wiresharking the network to see exactly what happens on TCP level would be a good start.

like image 67
Daniel Stenberg Avatar answered Nov 29 '22 04:11

Daniel Stenberg