Apache 2.2 – Understanding ‘apr_socket_recv: Connection Reset by Peer (104)’ Error

apache-2.2benchmarkconnectionnginx

So, if I do some benchmarking with apache benchmark (ab), and I use large numbers of requests. Then sometimes in the middle of a test I get this error.

I don't even know what it means. So how can I fix it? Or is it just something that will happen if the server gets too many hits anyway? The problem is, if I run 10,000 hits, it'll all run perfectly. If I run it again, it'll get to 4000 and get the error:

apr_socket_recv: Connection reset by peer (104)

A little about my setup:
I have nginx taking static requests and processing dynamic ones to apache. The file in question is served from cache by nginx, so I guess it's probably got to do with how nginx is handling the requests?

Ideas?

Best Answer

The error means that the other end (webserver) suddenly disconnected in the middle of the session. have a look at the apache or nginx error logs to see if there is anything suspicious there.

Related Topic