From af5d4dfd51377981b0a59d80fbce171e218c55a0 Mon Sep 17 00:00:00 2001 From: Roland Date: Sat, 11 Jan 2025 11:06:01 -0700 Subject: [PATCH] Disabling JIT for map database as recommended by mod_tile because of excess memory usgae. --- repair.sh | 2 ++ scripts/install_debian_12.sh | 2 +- scripts/install_raspberrypios.sh | 2 +- scripts/reset_map.sh | 4 ++++ wrolpi/scripts/migrate_map_db.sh | 2 ++ 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/repair.sh b/repair.sh index b8cc2f73..fcdf7e39 100755 --- a/repair.sh +++ b/repair.sh @@ -116,6 +116,8 @@ grep -q 'port: 5433' /opt/openstreetmap-carto/project.mml || ( (cd /opt/openstreetmap-carto/ && carto project.mml >mapnik.xml) ) chown -R _renderd:_renderd /opt/openstreetmap-carto +# Disable JIT as recommended by mod_tile +sed -i 's/#jit =.*/jit = off/' /etc/postgresql/15/map/postgresql.conf cp /opt/wrolpi/etc/raspberrypios/renderd.conf /etc/renderd.conf # Configure Apache2 to listen on 8084. diff --git a/scripts/install_debian_12.sh b/scripts/install_debian_12.sh index 44417cc4..3455c89d 100755 --- a/scripts/install_debian_12.sh +++ b/scripts/install_debian_12.sh @@ -58,7 +58,7 @@ file permissions if necessary: Start the WROLPi services using: # sudo systemctl start wrolpi.target -then navigate to: http://wrolpi.local +then navigate to: https://$(hostnmae).local Or, join to the Wifi hotspot: SSID: WROLPi diff --git a/scripts/install_raspberrypios.sh b/scripts/install_raspberrypios.sh index b8c523dd..f5c3c83d 100755 --- a/scripts/install_raspberrypios.sh +++ b/scripts/install_raspberrypios.sh @@ -58,7 +58,7 @@ file permissions if necessary: Start the WROLPi services using: # sudo systemctl start wrolpi.target -then navigate to: http://wrolpi.local +then navigate to: https://$(hostname).local Or, join to the Wifi hotspot: SSID: WROLPi diff --git a/scripts/reset_map.sh b/scripts/reset_map.sh index 4c602d07..336439a3 100755 --- a/scripts/reset_map.sh +++ b/scripts/reset_map.sh @@ -27,6 +27,10 @@ set -x systemctl stop renderd +# Delete old map database, if it exists. +sudo -iu postgres dropdb --port=5433 gis || : +sudo -iu postgres dropuser --port=5433 _renderd || : +# Delete new map database, it will be created again. sudo -iu postgres dropdb --port=5433 gis || : sudo -iu postgres dropuser --port=5433 _renderd || : diff --git a/wrolpi/scripts/migrate_map_db.sh b/wrolpi/scripts/migrate_map_db.sh index b387c590..1309617a 100755 --- a/wrolpi/scripts/migrate_map_db.sh +++ b/wrolpi/scripts/migrate_map_db.sh @@ -27,6 +27,8 @@ systemctl stop renderd # Create new cluster for the map. pg_createcluster 15 map --port=5433 --start +# Disable JIT as recommended by mod_tile +sed -i 's/#jit =.*/jit = off/' /etc/postgresql/15/map/postgresql.conf # Create user permissions for map user. sudo -iu postgres psql -c '\l' --port=5433 | grep gis || (