Skip to content

Commit

Permalink
try reduce connection pg
Browse files Browse the repository at this point in the history
  • Loading branch information
sdirollo committed Aug 29, 2023
1 parent fa0db4b commit fd16ade
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion tiles/config.toml.template
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,28 @@ srid = 3857
fid_field = "id"
buffer_size = 10
simplify = true
# Queries for different zoom levels:
[[tileset.layer.query]]
minzoom = 0
maxzoom = 2
sql = """
SELECT id, name, admin_level, zone_type, geometry
FROM $TABLE_SPACE.zones
WHERE geometry && !bbox! AND admin_level <= 2
"""
[[tileset.layer.query]]
minzoom = 3
maxzoom = 20
sql = """
SELECT id, name, admin_level, zone_type, geometry
FROM $TABLE_SPACE.zones
WHERE geometry && !bbox!
"""

[cache.file]
base = "/tmp/mvtcache"

[webserver]
bind = "0.0.0.0"
port = 6767
threads = 1
threads = 4

0 comments on commit fd16ade

Please sign in to comment.