0

Cowboy (Erlang) http ライブラリ、helloworld の例を試す: https://github.com/extend/cowboy/tree/master/examples/hello_world

この方法で Apache の「ab」テスト ツールを使用すると、「接続のリセット」が発生します。

d7 ~/cb/cowboy/examples/hello_world % !564
ab -n 30000 -c 5000 http://127.0.0.1:8080/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The 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 by peer (104)

-n 5000 -c 1000 のような小さい値でのテストは正しく機能します。

erl/Cowboy プロセスをクラッシュまたはリセットする問題は何ですか? 私はbeamのメモリ使用量をトップの下で観察しました.120MBのように成長し、わいせつなことは何もありません(私はそのvmに3GのRAMを持っています)。

ulimit 設定もかなり寛大です。

% 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

erl/cowboy が問題を抱えている可能性があるのは何ですか?

OS: Debian 7 x64。

4

1 に答える 1

1

SYN Cookie の送信を無効にしてみてください。/etc/sysctl.confnet.ipv4.tcp_syncookies = 0でこの行を検索します。

于 2013-07-24T08:59:46.473 に答える