{"action":"created","issue":{"url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/1814","labels_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/1814/labels{/name}","comments_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/1814/comments","events_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/1814/events","html_url":"https://github.com/Project-OSRM/osrm-backend/issues/1814","id":121948189,"number":1814,"title":"Parallel request to the server fails","user":{"login":"a6datta","id":14138235,"avatar_url":"https://avatars.githubusercontent.com/u/14138235?v=3","gravatar_id":"","url":"https://api.github.com/users/a6datta","html_url":"https://github.com/a6datta","followers_url":"https://api.github.com/users/a6datta/followers","following_url":"https://api.github.com/users/a6datta/following{/other_user}","gists_url":"https://api.github.com/users/a6datta/gists{/gist_id}","starred_url":"https://api.github.com/users/a6datta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a6datta/subscriptions","organizations_url":"https://api.github.com/users/a6datta/orgs","repos_url":"https://api.github.com/users/a6datta/repos","events_url":"https://api.github.com/users/a6datta/events{/privacy}","received_events_url":"https://api.github.com/users/a6datta/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-13T22:21:31Z","updated_at":"2015-12-14T08:39:11Z","closed_at":null,"body":"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\r\n\r\n\"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\r\n\r\nI am making the request from the c# application like below...\r\nloop start\r\nTask<double>  = Task<double>.Factory.StartNew(() => CalculateDistance(start, end));\r\nloop end\r\nawait Task.WhenAll();\r\n\r\nAs 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.\r\n\r\nI tried with only 8-10 request.\r\n\r\nIs there any plan to accommodate this capability within back end?\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/comments/164378461","html_url":"https://github.com/Project-OSRM/osrm-backend/issues/1814#issuecomment-164378461","issue_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/1814","id":164378461,"user":{"login":"hoerup","id":737393,"avatar_url":"https://avatars.githubusercontent.com/u/737393?v=3","gravatar_id":"","url":"https://api.github.com/users/hoerup","html_url":"https://github.com/hoerup","followers_url":"https://api.github.com/users/hoerup/followers","following_url":"https://api.github.com/users/hoerup/following{/other_user}","gists_url":"https://api.github.com/users/hoerup/gists{/gist_id}","starred_url":"https://api.github.com/users/hoerup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoerup/subscriptions","organizations_url":"https://api.github.com/users/hoerup/orgs","repos_url":"https://api.github.com/users/hoerup/repos","events_url":"https://api.github.com/users/hoerup/events{/privacy}","received_events_url":"https://api.github.com/users/hoerup/received_events","type":"User","site_admin":false},"created_at":"2015-12-14T08:39:11Z","updated_at":"2015-12-14T08:39:11Z","body":"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."}}