[Tile-serving] [openstreetmap/osm2pgsql] High connection volume to Postgres (Discussion #1650)

Jochen Topf notifications at github.com
Mon Mar 7 08:05:43 UTC 2022


The number of connections osm2pgsql uses correlates with the number of tables you are creating, I believe it uses one connection per table and then some. Something like that. This was never a problem with the `pgsql` output, because there were only a few. But with the `flex` output people tend to use more tables and hence, more connections. This is unfortunately not something easily changed because it is baked into the way we are doing threading and talking to the database in those threads. It has nothing to do with whatever you do in Lua (unless you open database connections from Lua itself).

The workaround is, as you mention, to increase `max_connections` in the database and/or use pgBouncer. 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/discussions/1650#discussioncomment-2306729
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/osm2pgsql/repo-discussions/1650/comments/2306729 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20220307/1b380f1c/attachment.htm>


More information about the Tile-serving mailing list