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

Zombie detector #57

Merged
merged 4 commits into from
Oct 4, 2024
Merged

Zombie detector #57

merged 4 commits into from
Oct 4, 2024

Conversation

zmstone
Copy link
Member

@zmstone zmstone commented Oct 4, 2024

From time to time, there is a buggy http server which silently drops requests without response or disconnect.
This PR starts a timer (interval configurable by max_inactive) to detect for how long the connection had been inactive after the last request had been expired.
If the it's inactive for longer than the configured max_inactive option, then the connection is restarted.

@zmstone zmstone force-pushed the 1004-add-max-inactive-check branch from c85ed5f to b362176 Compare October 4, 2024 13:19
@zmstone zmstone force-pushed the 1004-add-max-inactive-check branch from b362176 to f12165b Compare October 4, 2024 13:50
changelog.md Outdated Show resolved Hide resolved
src/ehttpc.erl Show resolved Hide resolved
src/ehttpc.erl Outdated Show resolved Hide resolved
src/ehttpc.erl Outdated Show resolved Hide resolved
src/ehttpc.erl Show resolved Hide resolved
test/ehttpc_tests.erl Outdated Show resolved Hide resolved
test/ehttpc_tests.erl Outdated Show resolved Hide resolved
test/ehttpc_tests.erl Outdated Show resolved Hide resolved
@qzhuyan
Copy link

qzhuyan commented Oct 4, 2024

shall socket opt: send_timeout_close help?

@zmstone
Copy link
Member Author

zmstone commented Oct 4, 2024

send_timeout_close

it's not that the socket is blocked, it's the server which blackholes requests.

@zmstone zmstone merged commit 2fb8a56 into main Oct 4, 2024
2 checks passed
@zmstone zmstone deleted the 1004-add-max-inactive-check branch October 4, 2024 19:12
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.

3 participants