Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/silo/api/api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ int Api::runApi(const silo::config::RuntimeConfig& runtime_config) {
try {
server_socket.bind(address, true);
server_socket.listen();
// Set timeouts to avoid hanging connections
server_socket.setReceiveTimeout(Poco::Timespan(30, 0));
Copy link
Contributor Author

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);

Copy link
Contributor Author

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

Copy link
Contributor Author

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....

Copy link
Contributor Author

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...

server_socket.setSendTimeout(Poco::Timespan(120, 0));
} catch (const Poco::Net::NetException& e) {
SPDLOG_ERROR(
"Failed to bind to port {}: {}", runtime_config.api_options.port, e.displayText()
Expand Down