Skip to content

fix: reduce StaleKeyLifetimeSec to 4 minutes #785

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cfbraun
Copy link
Contributor

@cfbraun cfbraun commented May 26, 2025

RFC 5321 recommends idle time of 5 minutes. Maddy runs pool cleanup once per minute. When a connection is returned to the pool at time 'last cleanup + 10 seconds', it will be closed at 'last cleanup + StaleKeyLifetimeSec + 60 seconds' . With the original value of 5 minutes, the connection will be closed 50 seconds after the recommended timeout. By reducing the lifetime to 4 minutes, connections might be closed a little early, but never late.

Should fix #693

RFC 5321 recommends idle time of 5 minutes. Maddy runs pool cleanup once per minute. When a connection is returned to the pool at time 'last cleanup + 10 seconds', it will be closed at 'last cleanup + StaleKeyLifetimeSec + 60 seconds' . With the original value of 5 minutes, the connection will be closed 50 seconds after the recommended timeout. By reducing the lifetime to 4 minutes, connections might be closed a little early, but never late.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

conn_max_idle_time ignored leading to remote: QUIT error
1 participant