Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

[root@localhost src]# ab -k -n 100000 -c 750 http://192.168.135.12/index.php
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 192.168.135.12 (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
1  
verify that Varnish works: wget 192.168.135.12/index.php or curl 192.168.135.12/index.php –  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

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.

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

 
discard

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.