I am trying to set up Graphhopper following the Quickstart Guide on GitHub. When trying to launch the application using the germany-latest.osm.pbf, I get an OutOfMemoryError after some time.
~/apps/graphhopper$java -jar *.jar jetty.resourcebase=webapp config=config-example.properties osmreader.osm=germany-latest.osm.pbf
2016-01-12 11:06:13,288 [main] INFO com.graphhopper.GraphHopper - version 0.5.0|2015-08-12T12:33:51+0000 (4,12,3,2,2,1)
2016-01-12 11:06:13,345 [main] INFO com.graphhopper.GraphHopper - graph CH|car|RAM_STORE|2D|NoExt|,,,,, details:edges:0(0MB), nodes:0(0MB), name:(0MB), geo:0(0MB), bounds:1.7976931348623157E308,-1.7976931348623157E308,1.7976931348623157E308,-1.7976931348623157E308, CHGraph|FASTEST|car, shortcuts:0, nodesCH:(0MB)
2016-01-12 11:06:13,389 [main] INFO com.graphhopper.GraphHopper - start creating graph from germany-latest.osm.pbf
2016-01-12 11:06:13,396 [main] INFO com.graphhopper.GraphHopper - using CH|car|RAM_STORE|2D|NoExt|,,,,, memory:totalMB:15, usedMB:4
Exception in thread "pool-1-thread-2" Exception in thread "pool-1-thread-1" java.lang.OutOfMemoryError: Java heap space
at java.util.HashMap.resize(HashMap.java:703)
at java.util.HashMap.putVal(HashMap.java:662)
at java.util.HashMap.put(HashMap.java:611)
at com.graphhopper.reader.pbf.PbfBlobDecoder.buildTags(PbfBlobDecoder.java:146)
at com.graphhopper.reader.pbf.PbfBlobDecoder.processWays(PbfBlobDecoder.java:272)
at com.graphhopper.reader.pbf.PbfBlobDecoder.processOsmPrimitives(PbfBlobDecoder.java:370)
at com.graphhopper.reader.pbf.PbfBlobDecoder.runAndTrapExceptions(PbfBlobDecoder.java:386)
at com.graphhopper.reader.pbf.PbfBlobDecoder.run(PbfBlobDecoder.java:404)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
java.lang.OutOfMemoryError: Java heap space
at java.util.ArrayList.iterator(ArrayList.java:834)
at java.util.Collections$UnmodifiableCollection$1.<init>(Collections.java:1039)
at java.util.Collections$UnmodifiableCollection.iterator(Collections.java:1038)
at com.graphhopper.reader.pbf.PbfBlobDecoder.buildTags(PbfBlobDecoder.java:138)
at com.graphhopper.reader.pbf.PbfBlobDecoder.processWays(PbfBlobDecoder.java:272)
at com.graphhopper.reader.pbf.PbfBlobDecoder.processOsmPrimitives(PbfBlobDecoder.java:370)
at com.graphhopper.reader.pbf.PbfBlobDecoder.runAndTrapExceptions(PbfBlobDecoder.java:386)
at com.graphhopper.reader.pbf.PbfBlobDecoder.run(PbfBlobDecoder.java:404)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
I only have 1gb of RAM on the Server. So now my question: Is increasing the RAM on the server the only way to set up Graphhopper with the German map or is there a different way of doing it?
Thanks for your help!