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

シナリオ2でToo many open filesが出る #17

Closed
ramenjuniti opened this issue Nov 3, 2019 · 20 comments
Closed

シナリオ2でToo many open filesが出る #17

ramenjuniti opened this issue Nov 3, 2019 · 20 comments

Comments

@ramenjuniti
Copy link
Contributor

ログ画面
image

@ramenjuniti
Copy link
Contributor Author

image

@YamagishiRyu
Copy link
Contributor

image

@YamagishiRyu
Copy link
Contributor

YamagishiRyu commented Nov 3, 2019

ELB 5XX 92419
HTTP 504 92419

@ramenjuniti
Copy link
Contributor Author

エラー一部
Nov 3 14:11:00 ip-10-1-13-230 hakaru: 2019/11/03 05:11:00 http: Accept error: accept tcp [::]:8081: accept4: too many open files; retrying in 1s

@pei0804
Copy link
Member

pei0804 commented Nov 3, 2019

#17 (comment)
ELBのせいではないということがわかったとか書くとよき。

@YamagishiRyu
Copy link
Contributor

image

CPUは100%近くでmemoryがだいぶ消費されている

@YamagishiRyu
Copy link
Contributor

 
image
file open の上限
なんかソフトとハードの二つある

@YamagishiRyu
Copy link
Contributor

YamagishiRyu commented Nov 3, 2019

https://pikesaku.wiki.fc2.com/wiki/ulimitについて

ソフトが適用される制限値。
ハードはユーザーが変更可能な上限値。

ulimitは一度に何個ファイル開けるかという数字。too many open filesはこの値を超えたときにでる。
今回のAPIはファイルを開いているのと同等なのでこのエラーが出たのではないか

@yamato3310
Copy link
Contributor

yamato3310 commented Nov 3, 2019

アプローチ

今回は一秒間で2000リクエストが来る
しかし、サーバーのファイルを開ける上限が1024だったため、デフォルトの上限の4096に変更をする

想定インパクト

too many open filesが減るだろう

モニタリング項目

hakaruのログ

結果/考察

@YamagishiRyu
Copy link
Contributor

image

@ramenjuniti
Copy link
Contributor Author

@yamato3310
Copy link
Contributor

yamato3310 commented Nov 3, 2019

アプローチ

ulimitの上限を上げることによって、さばける量を増やす
http://blog.father.gedow.net/2016/03/28/limits-of-systemd/

想定インパクト

too many open filesがなくなる

モニタリング項目

EC2のログ

結果/考察

@YamagishiRyu
Copy link
Contributor

YamagishiRyu commented Nov 3, 2019

image

hakaruのulimitが増えてる
1006500はOpen filesの上限数

@pei0804
Copy link
Member

pei0804 commented Nov 3, 2019

基本なにか確認したらログとか貼ってほしい。何を書いたら出たとかみたい。

@YamagishiRyu
Copy link
Contributor

YamagishiRyu commented Nov 3, 2019

image

数はELBとアプリケーションの504が合っていて、アプリケーションの値ということがわかる

@ramenjuniti
Copy link
Contributor Author

image

@YamagishiRyu
Copy link
Contributor

リクエスト数が安定していない、、、8万なんとかぐらいしかない
かけるがいけないんじゃね?→ #21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants