-
Notifications
You must be signed in to change notification settings - Fork 4
feat(silo): set timeouts if the connection hangs #1011
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
base: main
Are you sure you want to change the base?
Conversation
| server_socket.bind(address, true); | ||
| server_socket.listen(); | ||
| // Set timeouts to avoid hanging connections | ||
| server_socket.setReceiveTimeout(Poco::Timespan(30, 0)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again as soon as LAPIS is closed these requests go away and the new database can be loaded....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
poco_parameter->setTimeout(Poco::Timespan(300, 0)); also doesn't seem to solve the problem...
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