mediagis / nominatim-docker

100% working container for Nominatim
Creative Commons Zero v1.0 Universal
1.07k stars 437 forks source link

Database using up too much space #435

Open ipg0 opened 1 year ago

ipg0 commented 1 year ago

Describe the bug Nominatim database is expected to be about 900 GB, but while still importing, the database grew to more than 1.5 TB and continues to grow.

To Reproduce Steps to reproduce the behavior: Container started with command:

docker run -d -e PBF_PATH=/sources/data.osm.pbf -e REPLICATION_URL=https://planet.openstreetmap.org/replication/day/ -e THREADS=16 -e NOMINATIM_PASSWORD=[redacted] -e IMPORT_STYLE=address -e POSTGRES_SHARED_BUFFERS=4GB -e POSTGRES_MAX_WAL_SIZE=16GB -e POSTGRES_CHECKPOINT_TIMEOUT=30min -v /var/lib/pgsql/geocode-replicated/osm.pbf/:/import/:Z -v /var/lib/pgsql/geocode-replicated/pgsql/:/var/lib/postgresql/14/main/:Z -v /var/lib/pgsql/geocode-replicated/nominatim:/nominatim/:Z -v /var/lib/maps/geocode-sources/:/sources/:Z --shm-size=16g --memory=32g --memory-swap=100g -p 7071:8080 -p 5440:5432 --name nominatim-replicated mediagis/nominatim:4.2

The import process is now at the Starting interpolation lines (location_property_osmline) stage. The Postgres directory is over 1.5 TB.

Expected behavior Database size for planet data is expected to be about 900 GB.

Server:

Additional context The problem is I have only allocated 2TB to the Nominatim database volume, including additional files it now only has about 300 GB of free space left.

gsg-git commented 11 months ago

I think you should add the flatnode file: -v nominatim-flatnode:/nominatim/flatnode