feat(silo): set timeouts if the connection hangs#1011
Draft
anna-parker wants to merge 4 commits intomainfrom
Draft
feat(silo): set timeouts if the connection hangs#1011anna-parker wants to merge 4 commits intomainfrom
anna-parker wants to merge 4 commits intomainfrom
Conversation
Taepper
reviewed
Oct 3, 2025
anna-parker
commented
Oct 7, 2025
| server_socket.bind(address, true); | ||
| server_socket.listen(); | ||
| // Set timeouts to avoid hanging connections | ||
| server_socket.setReceiveTimeout(Poco::Timespan(30, 0)); |
Contributor
Author
There was a problem hiding this comment.
sadly I just tested locally and these two lines alone do not close the open requests from LAPIS. Potentially we need to set params->setKeepAlive(false);
Contributor
Author
There was a problem hiding this comment.
Oh no! I'm just testing locally and even with setKeepAlive(false) the connections don't appear to be cancelled?
I still see errors when I try to use a new processed data image:
[2025-10-07 09:57:17.812] [logger] [info] [active_database.cpp:23] Some requests on the old database with version 1759822253 are still running. Current reference count: 9
[2025-10-07 09:57:22.818] [logger] [info] [active_database.cpp:23] Some requests on the old database with version 1759822253 are still running. Current reference count: 9
Contributor
Author
There was a problem hiding this comment.
again as soon as LAPIS is closed these requests go away and the new database can be loaded....
Contributor
Author
There was a problem hiding this comment.
poco_parameter->setTimeout(Poco::Timespan(300, 0)); also doesn't seem to solve the problem...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
resolves #
poco server_connection limit needs to be set after the server binds and listens to the port
The Poco::Net::Socket::setSendTimeout function sets the timeout duration for sending data on a socket. It takes a Poco::Timespan object as an argument and delegates the operation to the socket's implementation, ensuring the socket is in a valid state before performing the operation.
Summary
PR Checklist