Ircama / osm-carto-tutorials

OpenStreetMap Carto Tutorials - Unofficial guides for openstreetmap-carto
https://ircama.github.io/osm-carto-tutorials/
GNU General Public License v3.0
28 stars 9 forks source link

Issue whilst importing maps into db #10

Open Mrsevic opened 7 years ago

Mrsevic commented 7 years ago

I am having troubles whilst importing the maps with osm2pgsql command. I have the VirtualBox compatible virtual machine with 2 cores and 4GB of RAM associated. I want to set it up to render certain huge zone like Italy. With small regions like Italia-nord I do not have problems. But I always have the huge problems with osm2pgsql command. Even if it imports the data all I get is ridiculously long loading times and red tiles as result. In 90% of situation I always end up with the similar following error:

nodecache stored 67.90

osm2pgsql failed due to ERROR CREATE INDEX planet_osm_ways_nodes ON planet_osm_ways USING gin (nodes) WITH (FASTUPDATE=off)

failed ERROR could not extend file "base/16385/138171.5": wrote only 4096 of 8192 bytes at block 786314 HINT: Check free disk space

I have 40GB of space and importing 1.1 GB Italy should not take this ammount of space. I do not have this problem whilst importing on windows. Is there a possibility to use remote windows postgresql db?

Could you please be kind enough and tell me the recommended settings for this configuration? I am sure that it would be useful for lots of people who do not have Linux as their default environment.

Right now I have tried with something like this but I am not sure whether or not is this optimal: sudo nano /etc/postgresql/9.5/main/postgresql.conf

shared_buffers = 512MB work_mem = 32MB maintenance_work_mem = 256MB min_wal_size = 256MB max_wal_size = 512MB sudo sysctl -w vm.overcommit_memory=1

kernel.shmmax=4294967296 and kernel.shmall=1048576 for 4 GB RAM

Thanks

Ircama commented 6 years ago

Check the free disk space of the partition hosting the DB.

Check also Osm2pgsql/benchmarks.

Check then this, this and this.

Ircama commented 6 years ago

Is there a possibility to use remote windows postgresql db?

Yes, of course, you can also use a cloud based DB instance.