[GraphHopper] Emergency brake to prevent out-of-memory?

Nop ekkehart at gmx.de
Mon Aug 26 22:02:08 UTC 2013


Hi!

Am 08.08.2013 19:24, schrieb Peter K:
>> It has plenty of heap space, little load and routing distance is
> limited to 100km.
>
> How do you limit it to 100km? You could modify your finish condition to
> really limit the routing to 100km searches.

I just calculate the distance as the crow flies and if that is already 
too large, there is an error.

>> Is there a way to limit the routing algorithm to just quit when the
> results become too complex in order to prevent an out-of-memory?
>
> No, but also the question is: what is too complex :) ? In the future I
> would like to create an A* + Dijkstra which only utilizes the available
> RAM which can be also very useful to perform none-CH routing on mobile
> devices.

Well, I thought of something like tracking the maximum path length used 
for successful calculations over time and maybe detect the last path 
length before an out of memory. When a path gets into the dangerous 
region, I'd rather end the search as unsuccessful than crash the server.

bye, Nop





More information about the GraphHopper mailing list