webserver - Erlang/cowboy crash (socket reset) on ab testing -


trying out cowboy (erlang) http library, helloworld example: https://github.com/extend/cowboy/tree/master/examples/hello_world

when using apache's "ab" testing tool in manner, "connection reset":

d7 ~/cb/cowboy/examples/hello_world % !564 ab -n 30000 -c 5000 http://127.0.0.1:8080/ apachebench, version 2.3 <$revision: 655654 $> copyright 1996 adam twiss, zeus technology ltd, http://www.zeustech.net/ licensed apache software foundation, http://www.apache.org/  benchmarking 127.0.0.1 (be patient) completed 3000 requests completed 6000 requests completed 9000 requests completed 12000 requests completed 15000 requests completed 18000 requests completed 21000 requests completed 24000 requests completed 27000 requests apr_socket_recv: connection reset peer (104) 

testing smaller values -n 5000 -c 1000 works correctly.

what may problem crashes or resets erl/cowboy process? have observed beam's memory usage under top , grows smth 120mb, nothing obscene (i have 3g of ram on vm).

ulimit settings rather generous:

% ulimit -a core file size          (blocks, -c) 0 data seg size           (kbytes, -d) unlimited scheduling priority             (-e) 0 file size               (blocks, -f) unlimited pending signals                 (-i) 24088 max locked memory       (kbytes, -l) 64 max memory size         (kbytes, -m) unlimited open files                      (-n) 65535 pipe size            (512 bytes, -p) 8 posix message queues     (bytes, -q) 819200 real-time priority              (-r) 0 stack size              (kbytes, -s) 16000 cpu time               (seconds, -t) unlimited max user processes              (-u) 24088 virtual memory          (kbytes, -v) unlimited file locks                      (-x) unlimited 

what erl/cowboy might have problem with?

os: debian 7 x64.

you should try disabling syn cookie sending. search line net.ipv4.tcp_syncookies = 0 in /etc/sysctl.conf.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -