Skip to content

Conversation

@lonvia
Copy link
Member

@lonvia lonvia commented Sep 6, 2025

NOMINATIM_REQUEST_TIMEOUT allows to restrict the maximum runtime of a query. Until now it only applied to the actual processing part of the query. Before that part starts, the client has to get a database connection from the connection pool. When a server gets overloaded and the request queue gets overly full, then it can take a long time before a connection is available. This can easily lead to situations where Nominatim only gets to process queries where the client has long given up waiting for a response.

This PR changes the meaning of the parameter and also applies it to the time spent waiting for a connection. If the timeout hits before a connection is available a TimeoutError (or HTTP 503) is returned. If the timeout then hits later while the query is being processed, the available requests will be returned as before.

@lonvia lonvia merged commit b0b909b into osm-search:master Sep 6, 2025
8 checks passed
@lonvia lonvia deleted the rework-query-timeouts branch September 6, 2025 09:08
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.

1 participant