komoot / photon

an open source geocoder for openstreetmap data
Apache License 2.0
1.91k stars 281 forks source link

Make timeout configurable #747

Closed karussell closed 8 months ago

karussell commented 1 year ago

It would be nice to reduce this timeout to protect us from problematic queries bringing the server down. Or make this configurable as some machines are more powerful and don't need a tight timeout.

lonvia commented 8 months ago

769 has an implementation of this. My tests show that this does have an effect on long-running nonsense queries but they still tend to run for a few seconds, even when the timeout is set to 1 s.

We might need a some extra protection against nonsense queries that might become a problem for ES.