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

DBコネクションが意図せず切断されないように TCP keepalive を短くする #57

Open
tichi73 opened this issue Sep 19, 2024 · 1 comment · Fixed by #65
Assignees
Labels

Comments

@tichi73
Copy link
Contributor

tichi73 commented Sep 19, 2024

Kompira と DB サーバ間のコネクションが途中経路などで意図せず切断されないように、TCP keepalive を短く設定する。
tcp_keepalive_time のデフォルトは 7200 (2時間) であり、ある環境ではこれではアイドル時に切断されてしまう(その後ジョブフローが正常動作しない)事象が発生した。当該環境では以下のように tcp_keepalive_time を 1800 (30分) にすることで、セッションが切れることが無くなった。

    sysctls:
      net.ipv4.tcp_keepalive_intvl: 75
      net.ipv4.tcp_keepalive_probes: 9
      net.ipv4.tcp_keepalive_time: 1800

※ 上記設定を docker-swarm.yml の DBアクセスするサービスに下記を追記して確認した。

@tichi73
Copy link
Contributor Author

tichi73 commented Sep 24, 2024

  • すべてのシステム構成においてデフォルトで適用する方針とする。
  • 対象コンテナは kompira, kengine とする。

@fixpoint-hasan fixpoint-hasan linked a pull request Nov 29, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants