mediagis / nominatim-docker

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

Parameter max_wal_size #152

Closed telubato closed 3 years ago

telubato commented 4 years ago

Hi,

In first steaps appers:

HINT: Consider increasing the configuration parameter "max_wal_size". There is something that we can configure?

mtmail commented 4 years ago

Afaik the hint depends on how fasts the disks are, so there is not one setting that fits all installations. It's also just for performance and can be ignored. The postgresql default is 80MB, https://nominatim.org/release-docs/latest/admin/Installation/#postgresql-tuning suggests 1GB. Even at 1GB you can still gets the hint in your logfiles, just less.

telubato commented 4 years ago

And when we get the error:

INFO: task postgres:23094 blocked for more than 120 seconds.

its related with this or with postgres configuration too?

mtmail commented 4 years ago

That's INFO, not an error. It comes from the operating system, not Nominatim or the database. Consult Linux system administration help pages, e.g. https://unix.stackexchange.com/questions/76166/what-does-info-task-xxx-blocked-for-more-than-120-seconds-exactly-mean-on-lin

telubato commented 4 years ago

After a few tries of import Europe, server always appers this:

image

Any ideas to solve ? Thank you.

brahica commented 3 years ago

Hello here, i find solution to update postgres config during data import

After lauching the cmd :

user@srv:/# docker run -t -v /home/me/nominatimdata:/data nominatim sh /app/init.sh /data/.osm.pbf postgresdata 4`

You can go in you container with :

user@srv:/# docker exec -it 4e5559ce2fa6 /bin/bash`

And then update postgres config with :

root@4e5559ce2fa6:/app# su - postgres postgres@4e5559ce2fa6:/app# /usr/bin/pg_conftool set max_wal_size 10GB //10GB Less or more postgres@4e5559ce2fa6:/app# psql postgres=# SELECT pg_reload_conf();

Then No more log like :

HINT: Consider increasing the configuration parameter "max_wal_size".

philipkozeny commented 3 years ago

max_wal_size and many other settings can now be configured via environment variables in 3.6!