Project-OSRM / osrm-backend

Open Source Routing Machine - C++ backend
http://map.project-osrm.org
BSD 2-Clause "Simplified" License
6.18k stars 3.29k forks source link

Resource exhausted #6681

Open okssev opened 10 months ago

okssev commented 10 months ago

Hello,

Recently we encountered an issue, where we had bigger than usual load to our osrm services returning walking/driving routes. We had 2 container replicas per service at that point and cpu usage reached a threshold for the machine that these containers were running in. We decided to scale to 4 replicas and cpu usage dropped to the level that is managable. Hovewer, some of the requests(about 1 percent) still returned resource exhausted errors from osrm even though the load was balanced between these 4 replicas. Is there some kind of limitation from osrm side which we may not know? A limit of parallel requests or some other thing

nilsnolde commented 10 months ago

Which server are you using? Note that osrm-routed is not meant to be used for anything else than testing (at least it's not really a production-ready server).

okssev commented 10 months ago

No, we are hosting ourselves or what do you mean by not using osrm-routed

okssev commented 10 months ago

Command we're using to spin up the service is this - osrm-routed --verbosity WARNING --algorithm mld /data/data.osrm

nilsnolde commented 10 months ago

There's many comments in this repo talking about how routed is a development server (couldn't find one though in a hurry). I meant server application, sorry. It's one of the main reason the node bindings exist, bcs it's so much easier to do that properly in node.

okssev commented 10 months ago

Just to clarify that I understand correctly. So, your suggestion would be for us to write our own web service application that is handling the requests and using this osrm library just to calculate the actual route?

nilsnolde commented 10 months ago

To be clear, I don't suggest, I just give some context. I have no idea if your problems are rooted in routed or elsewhere and/or if another server app would cure that.

github-actions[bot] commented 2 weeks ago

This issue seems to be stale. It will be closed in 7 days if no further activity occurs.