osm2pgsql seems to freeze midway. I had done an osmosis upgrade few days back. Please suggest how to troubleshoot this. Earlier also it had hung up for 6 days so I had killed it.
Below process is running right now:
osm2pgsql -a --slim -e10-15 -d gis --flat-nodes /var/data/flat_nodes.bin --cache 2000 --number-processes 8 -G --hstore --tag-transform-script /home/postgresql/osm/openstreetmap-carto/openstreetmap-carto.lua --style /home/postgresql/osm/openstreetmap-carto/openstreetmap-carto.style --multi-geometry -o /var/lib/mod_tile/dirty_tiles.10057 /var/lib/mod_tile/changes.osc.gz
/usr/local/bin/osm2pgsql --version
osm2pgsql version 0.96.0 (64 bit id space)
Compiled using the following library versions:
Libosmium 2.14.2
Lua 5.2.4
root@xxxxx:/var/log/tiles# tail osm2pgsql.log
Large polygon (33929 x 41624 metres, OSM ID -162378) - only expiring perimeter
Large polygon (33929 x 41624 metres, OSM ID -162378) - only expiring perimeter
Large polygon (88519 x 83715 metres, OSM ID -163123) - only expiring perimeter
Large polygon (82590 x 80987 metres, OSM ID -163123) - only expiring perimeter
Large polygon (79281 x 53239 metres, OSM ID -163123) - only expiring perimeter
Large polygon (78634 x 80987 metres, OSM ID -163123) - only expiring perimeter
Large polygon (91576 x 83715 metres, OSM ID -163123) - only expiring perimeter
Large polygon (79281 x 53239 metres, OSM ID -163123) - only expiring perimeter
Large polygon (95617 x 139209 metres, OSM ID -163124) - only expiring perimeter
Large polygon (96661 x 112500 metres, OSM ID -163124) - only expiring perimeter
asked
27 Apr '20, 10:20
augustusj
46●6●7●9
accept rate:
0%
When it "seems to freeze" what is happening on your system in terms of CPU use, memory use, etc.?
The process is running as seen in the output of top. This server has 32 cpu cores. But osm2pgsql.log is not having any updates. It runs like this for many days without any updates in the log file.
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 15406 rendera+ 20 0 58.183g 0.013t 0.012t R 100.0 20.6 82:25.79 osm2pgsql
memory usage:
free -m
Mem: 64384 2505 980 16706 60898 44522 Swap: 15255 0 15255
What is your osmosis command like? Did you simplified the changes and is this a combined change for what timeframe? Which osmosis version are you using?
This may be of help: https://blog.geofabrik.de/?p=544 (read the case about problems since or around April 17th.).
The solution provided by Spiekerooger worked for me. I increased the maxInterval to 432000 seconds which is 5 days and the update worked fine.