Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't stop accept: Too many open files #72

Closed
soara opened this issue Jun 11, 2017 · 4 comments
Closed

don't stop accept: Too many open files #72

soara opened this issue Jun 11, 2017 · 4 comments
Labels

Comments

@soara
Copy link

soara commented Jun 11, 2017

file descriptor の最大値を指定している環境で yrmcdsを動かして, その yrmcds に対してベンチマークを取っていたときに, accept: Too many open files が止まらなくなりました.
ベンチマーク用のプログラムを止めても出続けました.

そのとき CPU 1個ぶんが 100%になっていたのと、 strace をかけたときに accept4() が連続して出力されたことから, この 箇所 で無限ループしているのではないかと思いました。

Design Notes によれば, reactor が socket closeを担うそうなので, reactor で on_readable() を呼び出し, その内部でループしてしまうと, reactorによる file descriptorの解放ができないので, on_readable() 内部のループから抜け出せないのではないかと推測しました(正しいかどうかまでは確認していません).

@ymmt2005
Copy link
Member

ありがとうございます。はい、ご指摘の挙動になると思います。
よろしければ再現可能なベンチマークプログラムをいただけないでしょうか。

@ymmt2005 ymmt2005 added the bug label Jun 11, 2017
@soara
Copy link
Author

soara commented Jun 12, 2017

お待たせして申し訳ありません.

ベンチマークプログラムは twemperf(mcperf) になります.
こちらでテストしたときの情報は gist に置いておきました.

次のパターンで accept: Too many open files が出続けています.

Max open files (soft/hard) yrmcds.conf max_connections
4096 / 4096 10000
1024 / 4096 1000

@DerDanilo
Copy link

We solved this by settings higher limits. Is that actually something that should be solved by yrmcds itself?

@ymmt2005
Copy link
Member

ymmt2005 commented Nov 1, 2024

Fixed by #91 and #95.

@ymmt2005 ymmt2005 closed this as completed Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants