After sucessfully setting up a ORS backend using the OSM file of south of Brazil (200 MB), I tried to do with the whole Brazil country (1 GB) but localhost:8080/ors/health got stuck in “not ready” and the ors.log returned some memory errors.
Here follows my docker-compose.yml, I did set both Xms and Xmx to 8g (way more than the 2*PBF size suggested)
I only left “vehicles-car” profile active in app.config.sample to reduce memory usage.
The laptop is running Ubuntu 18.04 with 16 GB RAM.
I appreciate any suggestion for addressing this issue.
If any other file or log is needed please ask me so I can update the post.
I think this is likely because though the pbf size is small for south america, the geographical context is a lot bigger so there is quite a bit of elevation data that would be loaded aswell. The bit that it is failing on is in the landmark processing, and so what I expect is happening is that because the number of threads for preparing is set to 8, having both shortest and fastest calculations happening at the same time is too much. Try doing it again but in the following:
We changed the configuration to the following but still have the same error. In our case the pbf file is 2G. We set the Xms20g already. From other posts it seems there is a bug in the release. Any other suggestions to fix the issue?
setting threads to 1;
setting landmarks to 16;
deleting shortest weightings.
Caused by: java.lang.OutOfMemoryError: Java heap space
ors-app | at com.carrotsearch.hppc.IntObjectHashMap.allocateBuffers(IntObjectHashMap.java:1103) ~[hppc-0.8.1.jar:?]
ors-app | at com.carrotsearch.hppc.IntObjectHashMap.allocateThenInsertThenRehash(IntObjectHashMap.java:1136) ~[hppc-0.8.1.jar:?]
ors-app | at com.carrotsearch.hppc.IntObjectHashMap.put(IntObjectHashMap.java:180) ~[hppc-0.8.1.jar:?]
ors-app | at com.graphhopper.routing.AbstractBidirAlgo.fillEdges(AbstractBidirAlgo.java:315) ~[graphhopper-core-v0.13.2.jar:?]
ors-app | at com.graphhopper.routing.AbstractBidirAlgo.fillEdgesFrom(AbstractBidirAlgo.java:274) ~[graphhopper-core-v0.13.2.jar:?]
ors-app | at com.graphhopper.routing.AbstractBidirAlgo.runAlgo(AbstractBidirAlgo.java:238) ~[graphhopper-core-v0.13.2.jar:?]
ors-app | at com.graphhopper.routing.lm.LandmarkStorage$LandmarkExplorer.runAlgo(LandmarkStorage.java:814) ~[graphhopper-core-v0.13.2