Closed devopsnot closed 1 year ago
What is the exact command that you run?
stoi
is a function that tries to convert a string to and int. Are you perhaps passing in an arguments that cannot be converted to an int?
I run the following docker-compose with 'docker compose up'
version: '3'
networks:
nominatim_import:
external: false
services:
nominatim_import:
image: mediagis/nominatim:4.1
command:
- /bin/bash
- -ec
- |
nominatim import --osm-file data.osm.pbf --threads $$THREADS
nominatim index --threads $$THREADS
nominatim admin --check-database
if [ "$$REPLICATION_ENABLED" = "true" ]; then
nominatim replication --init
if [ "$$FREEZE" = "true" ]; then
echo "Skipping freeze because REPLICATION_URL is not empty"
fi
else
if [ "$$FREEZE" = "true" ]; then
echo "Freezing database"
nominatim freeze
fi
fi;
working_dir: /nominatim
environment:
- NOMINATIM_IMPORT_STYLE=full
- NOMINATIM_DATABASE_DSN=pgsql:host=${NOMINATIM_DB_HOST};port=${NOMINATIM_DB_PORT};user=${NOMINATIM_DB_USER};password=${NOMINATIM_DB_PASSWORD};dbname=${NOMINATIM_DB_NAME}
- NOMINATIM_REPLICATION_URL=${NOMINATIM_REPLICATION_URL}
- REPLICATION_ENABLED=true
- THREADS=${IMPORT_THREADS:-16}
- NOMINATIM_DATABASE_WEBUSER=${NOMINATIM_DB_USER}
networks:
- nominatim_import
volumes:
- ${OSM_PBF_FOLDER:-/var/lib/docker/data/osm/geofabrik}/${OSM_PBF_FILE:-brazil-latest.osm.pbf}:/nominatim/data.osm.pbf
I would try modifying the line with THREADS to just use a fixed value of 16.
I'm trying to import Nominatim to an external database, but I'm getting the following error.
My bank machine has 32GB of RAM, 8 core processor.
The machine where I'm running the container to carry out the import has 64GB of RAM, also with an 8-core processor.
It doesn't give me any log in the database, only that a new database was created