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

Fix connection getting timeout while idle #1167

Merged
merged 7 commits into from
Dec 27, 2023

Conversation

bigmontz
Copy link
Contributor

@bigmontz bigmontz commented Dec 21, 2023

When the connection goes idle, an observer is appended. And this causes the receive timeout to start to count. This behaviour causes connections timing out while being idle in the pool.

For fixing this, the connection received methods to handle its status changing to idle and back from idle. When the connection goes idle, it should stop the timeouts and do not start any timeout until it gets busy again.

This change also impacts the hasOngoingRequests method, since idle connections don't have ongoing requests.

@bigmontz bigmontz marked this pull request as ready for review December 22, 2023 14:20
Copy link
Member

@robsdedude robsdedude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐇

@bigmontz bigmontz merged commit ce8bc52 into neo4j:5.0 Dec 27, 2023
40 checks passed
@bigmontz bigmontz deleted the 5.0-fix-connection-recv-timeout branch December 27, 2023 12:50
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.

2 participants