im running varnish->nginx(php-fpm) and im using ab but it keeps messing up.

[root@localhost src]# ab -k -n 100000 -c 750
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking (be patient)
apr_socket_recv: Connection reset by peer (104)

is there anything else i can use? or am i doing it wrong?


3 Answers 3


Try raising the amount of "worker_processes" and "worker_connections" in nginx.conf.

The default values of

worker_processes  1;
worker_connections  1024;

are not sufficient. When running with the above ab-command my nginx gave the same error.

With these (randomly raised and probably too high - try tweaking with little steps) values instead

worker_processes  15;
worker_connections  4096;

it could manage the generated load on a simple HTML-file.


I had this issue and found turn off tcp_syncookies stopped it. To turn it off do

cd /proc/sys/net/ipv4
echo "0" > tcp_syncookies

Now I don't know what other issues this will cause, but it is a place to start.


Is it due to Linux limit when you ran ab. First update ab to last version(2.2.*). Then look "/var/log/kernel.log". Check free memory when run ab. Also check Varnish log.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .