Project-OSRM / osrm-backend

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

Stuck after 1014 requests. #5542

Open whizsid opened 4 years ago

whizsid commented 4 years ago

I have built the OSRM backend on my ubuntu 18 server by following these steps. After that, I have made 60,000 different requests by a program. After 1014 requests processed, OSRM server stuck and did not give me a response via curl. Neither printed my request with OSRM.

But when I build the same source with DCMAKE_BUILD_TYPE=Debug All requests succeeded.

akashihi commented 4 years ago

Did you used keepalive connections?

whizsid commented 4 years ago

No. Just a fresh installation. This is my curl options set by a PHP script.

       CURLOPT_RETURNTRANSFER => 1,
        CURLOPT_URL => "http://localhost:5000/route/v1/driving/$lng1,$lat1;$lng2,$lat2?overview=false&alternatives=true&steps=true",
        CURLOPT_USERAGENT => 'Salesman Alogythm Request'
akashihi commented 4 years ago

I just made ~10k route requests on a same osrm built from latest master without any issues.

Nate-Wessel commented 4 years ago

I experienced a similar problem. I didn't count the exact number of requests made, but it was right around 1k. I reproduced this on two different computers, also running ubuntu 18.04. At first, I was running some older code on one computer (maybe 2-3 months out of date) and tried to fix this by updating and rebuilding the latest OSRM version. Same issue in both the older and latest versions.

Killing the server and restarting it would give me another ~1k requests before the same timeout errors appeared again - the server was not responding.

When I found this issue, I tried rebuilding with debug mode as suggested and found that everything worked as expected.

kaligrafy commented 4 years ago

I think I have the same problem. I have to use a modified node-fetch with retries to make sure I do not get timeouts. I will try compiling in debug mode, but is that going to slow calculations?

jamaps commented 3 years ago

I had the same problem too. Except it got stuck at 1016 requests. Re-building with DCMAKE_BUILD_TYPE=Debug worked though. This was all with v5.25.0. cheers,

github-actions[bot] commented 3 weeks ago

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