python – Tornado, Nginx, Apache ab – apr_socket_recv: Connection reset by peer (104)

python – Tornado, Nginx, Apache ab – apr_socket_recv: Connection reset by peer (104)

I had the same problem using apache benchmark on a sinatra app using webrick. I found the answer here .

Its actually problem of your Apache server.

The bug has been removed in the higher versions of apache. Try downloading them here.

I had the same issue and looking for information in the logs i got this lines:

Oct 15 10:41:30 bal1 kernel: [1031008.706185] nf_conntrack: table full, dropping packet.
Oct 15 10:41:31 bal1 kernel: [1031009.757069] nf_conntrack: table full, dropping packet.
Oct 15 10:41:32 bal1 kernel: [1031009.939489] nf_conntrack: table full, dropping packet.
Oct 15 10:41:32 bal1 kernel: [1031010.255115] nf_conntrack: table full, dropping packet.

In my particular case, the conntrack module is use inside iptables because the same server have the firewall.

One solution for fix that is unloading the conntrack module, and other and easy is with this two lines applied in the firewall policy:

iptables -t raw -I PREROUTING -p tcp  -j NOTRACK
iptables -t raw -I OUTPUT -p tcp  -j NOTRACK

python – Tornado, Nginx, Apache ab – apr_socket_recv: Connection reset by peer (104)

Leave a Reply

Your email address will not be published.