mediagis / nominatim-docker

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

Mounting flatnode as volume causes process stall at NOTICE: table "place" does not exist, skipping #468

Closed alekw closed 10 months ago

alekw commented 1 year ago

Describe the bug I tried to set up instance with docker-compose as below, and noticed that process stalls on this line for hours: nominatim | NOTICE: table "place" does not exist, skipping

version: "2.3"
services:
  nominatim:
    image: mediagis/nominatim:4.2
    container_name: nominatim
    restart: always
    ports: 
      - 8080:8080
    environment: 
      - PBF_URL=https://download.geofabrik.de/europe/andorra-latest.osm.pbf
      - REPLICATION_URL=https://download.geofabrik.de/europe/andorra-updates
      - REPLICATION_RECHECK_INTERVAL=86400
      - NOMINATIM_PASSWORD=12345678
      - THREADS=48
    volumes:
      - ./db:/var/lib/postgresql/14/main
      - ./flatnode:/nominatim/flatnode
    shm_size: 16gb

The line that causes the issue is mounting flatnode.

To Reproduce Steps to reproduce the behavior:

  1. Save my docker-compose.yml
  2. Command: docker-compose up
  3. See output
  4. Repeat when ./flatnode mount is not present

Expected behavior I expected setup to finish in similar time. In my case 2 minutes without flatnode, and at least 2 hours with it (I cancelled then)

Screenshots & Logs If applicable, add screenshots & logs to help explain your problem.

nominatim    | + cd /nominatim
nominatim    | + '[' '' = true ']'
nominatim    | + sudo -E -u nominatim nominatim import --osm-file /nominatim/data/andorra-latest.osm.pbf --threads 48
nominatim    | 2023-08-08 21:53:32: Using project directory: /nominatim
nominatim    | 2023-08-08 21:53:35: Creating database
nominatim    | 2023-08-08 21:53:36: Setting up country tables
nominatim    | 2023-08-08 21:53:38: Importing OSM data file
nominatim    | 2023-08-08 21:53:38  osm2pgsql version 1.7.2
nominatim    | 2023-08-08 21:53:38  Database version: 14.8 (Ubuntu 14.8-0ubuntu0.22.04.1)
nominatim    | 2023-08-08 21:53:38  PostGIS version: 3.2
nominatim    | 2023-08-08 21:53:38  Parsing gazetteer style file '/usr/local/etc/nominatim/import-full.style'.
nominatim    | NOTICE:  table "place" does not exist, skipping

Desktop / Server (please complete the following information):

mtmail commented 1 year ago

The "NOTICE" line itself is just an info message, I think when it tries to remove a table before recreating it.

What follows is the import of data using osm2pgsql. It will create a 80GB file regardless how big (small) the input is https://osm2pgsql.org/doc/manual.html#flat-node-store It should only be used when importing the whole planet or big continents.

alekw commented 1 year ago

OK, now I get it, I thought it will be fast as without flatnode for Andora. I setup now Europe for test without flatnode, then when I know how much time it took, I will try again with flatnode. Thanks for that documentation, I am too new user of OSM and jumped straight to docker, without that basics knowledge.