Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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,
Copyright 2006 The Apache Software Foundation,

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

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

share|improve this question
verify that Varnish works: wget or curl – alvosu Feb 5 '11 at 7:11
it works fine. its just i dont get why anything past 500 concurrent connections crash – Sam Williams Feb 5 '11 at 7:27
Did you manage to find the solution? – Industrial Mar 11 '12 at 11:20

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.

share|improve this answer

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.

share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.