France installation Java heap space error


I post again on a new problem ahah

I spent the afternoon digging around to understand this error:

I am trying to install a pbf for the whole of France (3.6GB)

I searched your forum (, as well as the github wiki, but I can’t figure out how to change the Java configuration in Docker.
Here is my configuration, which is the basic one:

- "JAVA_OPTS=-Djava.awt.headless=true -server -XX:TargetSurvivorRatio=75 -XX:SurvivorRatio=64 -XX:MaxTenuringThreshold=3 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:ParallelGCThreads=4 -Xms1g -Xmx2g"

I can’t seem to figure out how to change the settings according to this sentence in the wiki:

It should be mentioned that if your dataset is very large, please adjust the -Xmx parameter of JAVA_OPTS environment variable. A good rule of thumb is to give Java 2 x file size of the PBF ** per profile **.

I’m running Docker on a MacBook Pro 2016, RAM : 16Go and processor : 2,6 GHz Quad-Core Intel Core i7

Thanks alot !


The heap is what Java uses for storing objects in memory, and so you need to change the -Xmx2g parameter. Basically, the -Xmx part is what says “the maximum heap size is…” and the 2g is the amount of memory. We recommend a heap size of double the pbf size, so for a pbf size of 3.6GB you should change -Xmx2g to -Xmx8g which will allow 8GB of the machines RAM to be used as the Java heap. Be careful when not using a dedicated machine though as this just tells Java it can use 8GB, but if there isn’t 8GB of free space (because of other things running on the machine) then your system could become unstable.

You can also consider changing -Xms1g to -Xms8g aswell, which then will straight away reserve 8GB of the RAM for the java heap which no other process on the machine can then get hold of (basically rather than it gradually allocating RAM up to 8GB, it would start with 8GB RAM as heap).

1 Like


I’ve try to launch with this conf, hop thats work, thanks!