When running tilemaker with the --store option on ubuntu 20.04 I experienced an mmap error.
[...]
Reading .pbf planet-optimized.osm.pbf
(Scanning for ways used in relations: 99%) (15522 ms)
Store size 932G | Block 520969/1107585 terminate called after throwing an instance of 'std::runtime_error'
what(): Failed to open mmap file
Command terminated by signal 6
Command being timed: "tilemaker --config config.json --process process.lua --output planet.mbtiles --store /nvme/tilemaker.tmp --compact planet.osm.pbf"
Running strace shows that the process is killed due to too many open files.
Solution
Run ulimit -a to check how many open files you have configured. If its 1024, it is not enough. At least not in my case.
Running ulimit -n 10000 to increase the number of open files solved the problem.
Our machine has 128 CPU threads. This might play a role (more child processes, more open files?)
Problem
When running tilemaker with the
--store
option on ubuntu 20.04 I experienced an mmap error.Running
strace
shows that the process is killed due totoo many open files
.Solution
Run
ulimit -a
to check how many open files you have configured. If its 1024, it is not enough. At least not in my case. Runningulimit -n 10000
to increase the number of open files solved the problem.Our machine has 128 CPU threads. This might play a role (more child processes, more open files?)