Set timeout for idle transactions at session level #2290
Replies: 2 comments 2 replies
-
Generally osm2pgsql should not hold open connections for a long time and the situation should have improved with changes in recent versions. This goes double for sessions that have a transaction open. Open sessions use ressources while they are open, but more importantly open transactions can lead to bloat. I think we should first try to get the root cause solved in the application or at least try to figure out how long we need this timeout to be before setting this. It would help if you can give us more info about the situation where this happens, i.e. which connection is the problem. If you enable debug logging, you'll hopefully get more information on when this happens. |
Beta Was this translation helpful? Give feedback.
-
Ah, this is about the replication issue again. You should have said so from the beginning. We are aware of that issue. Closing as duplicate of #2273. |
Beta Was this translation helpful? Give feedback.
-
On some managed databases, the timeout for idle transactions is relatively low (for the scope of the work that
osm2pgsql
does). On Neon, for example, the timeout value for idle transactions is 5 minutes.When we are processing a large file, it's very easy for this timeout to trigger. On Neon this will lead to something like
To workaround this, we can change the timeout value for the role used by
osm2pgsql
However, I think it would be nice if this was done automatically by
osm2pgsql
at the session level.Beta Was this translation helpful? Give feedback.
All reactions