File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22# CONNECTIONS AND AUTHENTICATION
33#------------------------------------------------------------------------------
44listen_addresses = '*' # Allow connections from any network interface
5- max_connections = 200 # Increase if you expect more concurrent connections
5+ max_connections = 300 # 4 Tegola replicas × 56 conn + refresh/imposm headroom
66superuser_reserved_connections = 5 # Reserve connections for superusers
77
88#------------------------------------------------------------------------------
@@ -11,7 +11,7 @@ superuser_reserved_connections = 5 # Reserve connections for superusers
1111
1212# - Memory Configuration -
1313shared_buffers = 16GB # ~13% of 125GB RAM
14- work_mem = 512MB # Memory for each sort/hash operation; be cautious with many parallel queries
14+ work_mem = 256MB # Memory for each sort/hash operation; balanced for 300 max connections
1515maintenance_work_mem = 8GB # Larger memory for VACUUM / CREATE INDEX / ALTER / REFRESH
1616effective_cache_size = 80GB # ~65% of 125GB RAM
1717
Original file line number Diff line number Diff line change @@ -20,10 +20,10 @@ source ./scripts/utils.sh
2020# Usage:
2121# refresh_mviews_group "WATER" 180 light "${water_views[@]}" &
2222# ============================================================================
23- LIGHT_WORK_MEM=" ${LIGHT_WORK_MEM:- 64MB } "
24- LIGHT_MAINT_MEM=" ${LIGHT_MAINT_MEM:- 256MB } "
25- HEAVY_WORK_MEM=" ${HEAVY_WORK_MEM:- 512MB } "
26- HEAVY_MAINT_MEM=" ${HEAVY_MAINT_MEM:- 4GB } "
23+ LIGHT_WORK_MEM=" ${LIGHT_WORK_MEM:- 256MB } "
24+ LIGHT_MAINT_MEM=" ${LIGHT_MAINT_MEM:- 2GB } "
25+ HEAVY_WORK_MEM=" ${HEAVY_WORK_MEM:- 1GB } "
26+ HEAVY_MAINT_MEM=" ${HEAVY_MAINT_MEM:- 8GB } "
2727
2828function refresh_mviews_group() {
2929 local group_name=" $1 "
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ type = "prometheus"
2626name = " ohm"
2727type = " mvt_postgis"
2828uri = " postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}"
29- max_connections = 120
29+ max_connections = 30
3030 # ##### PROVIDERS_OSM
3131
3232# ###################################
@@ -37,7 +37,7 @@ max_connections = 120
3737name = " ohm_admin"
3838type = " mvt_postgis"
3939uri = " postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}"
40- max_connections = 25
40+ max_connections = 8
4141 # ##### PROVIDERS_ADMIN_BOUNDARIES_AREAS
4242
4343# ###################################
@@ -48,7 +48,7 @@ max_connections = 25
4848name = " ohm_other_boundaries"
4949type = " mvt_postgis"
5050uri = " postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}"
51- max_connections = 25
51+ max_connections = 8
5252 # ##### PROVIDERS_NON_ADMIN_BOUNDARIES_AREAS
5353
5454# ###################################
@@ -58,7 +58,7 @@ max_connections = 25
5858name = " ne"
5959type = " mvt_postgis"
6060uri = " postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}"
61- max_connections = 25
61+ max_connections = 5
6262 # ##### Water lands ne
6363 [[providers .layers ]]
6464 name = " ne_water_lakes_0-8"
@@ -74,7 +74,7 @@ max_connections = 25
7474name = " osm_land"
7575type = " mvt_postgis"
7676uri = " postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}"
77- max_connections = 25
77+ max_connections = 5
7878 [[providers .layers ]]
7979 name = " osm_land_0-2"
8080 geometry_fieldname = " geometry"
You can’t perform that action at this time.
0 commit comments