4

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?

2

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.

2

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.

1

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.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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