Openstreetmap.org route dragging broken

Given any random route, such as this one OpenStreetMap

When I drag the destination, I may get a few updates until it just stops working completely with the below error. A reload with F5 fixes the issue.

Seems to affect OSMR? GrapHopper seems even more broken?

We’ve recently introduced rate limiting on the OSRM servers as they are, like any other free service, more and more subject of abuse. That rate limit doesn’t work well with the route-as-you-drag approach of the OSM main site. I’ve slightly increased the permitted burst, so that you won’t run into the limits as fast but we probably need to find a more permanent solution.

2 Likes

We can turn that off - the OSRM router is the only one with it enabled.

I can’t find the ticket now but we did get another report recently but nobody has picked it up yet.

Oh, must have missed that ticket. I wonder if it would be possible to just tone down the number of requests a bit. Right now I see up to 10 request/s. If we get it down to something like 3 request/s, then that should work out by my calculations.

It might not have been a ticket but somebody definitely raised it somewhere…

The code is openstreetmap-website/app/assets/javascripts/index/directions.js at 9547be896361e08472d14ffa6ec6ac0e71f86b23 · openstreetmap/openstreetmap-website · GitHub but currently OSRM is the only engine with the draggable flag set but that’s where any rate limiting would need to go.

I really always loved that feature, dragging around and seeing it change immediately is truly unique, but I also saw how extremely often it did that request. Maybe this could be solved with some 300-500ms minimum delay and an exponential back off all on the client?

Wait, but isn’t part of the problem that it doesn’t recover from the rate limit?