-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parallel request to the server fails #1814
Comments
node-osrm is the recommended way to run osrm in production: https://github.com/Project-OSRM/node-osrm |
I had have the same problem when use many threads - my program stalls and returns same error after 30 seconds waiting for response. It was caused from .Net. For some reasons .net fails with request from many threads. Notably absent is support for pipelining, which allows multiple requests to be served over a single socket. OSRM Issue #531 has some documented workarounds. |
I agree with @kostadin24 that it must be in a problem with .net or your code. I have no problem issuing 8 simultaneous requests to osrm-routed via threads from a java program. |
As @kostadin24 says, note that OSRM does not support pipelining. Depending on how you create HTTP connections in .NET, you might be using pipeling by default. Try explicitly settings specifying the |
@a6datta any updates here? |
@TheMarex It was actually an issue with my Windows 8 system itself, not particularly the limitation of dot net framework. I just moved the OSRM backend to a windows server machine and it works fine. |
Thanks @a6datta for the update. |
Hi, I am running osrm back end in a windows pc. When I request a route between two points it returns the result almost instantly. However if I use 'async Task' to request routes between two point it fails with the error below
"10.267537576608 14.292158787192 System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time
I am making the request from the c# application like below...
loop start
Task = Task.Factory.StartNew(() => CalculateDistance(start, end));
loop end
await Task.WhenAll();
As dot net executes each task within the loop in separate thread, my understanding is that the requests are being made almost parallel which is causing deadlock in the osrm server.
I tried with only 8-10 request.
Is there any plan to accommodate this capability within back end?
The text was updated successfully, but these errors were encountered: