We have two datacenters, one in America and one in Europe. For various reasons, the Europe datacenter has the database server, while the workers and web apps are in America.
PGbouncer is in the American datacenter, in transaction pooling mode, helping reduce connection latency to the european datacenter. Unfortunately, I often have transactions in the "<IDLE> in transaction
" state, which are holding locks and preventing the rest of the machines from making useful progress.
America
-------
worker webapp
| |
\ /
\ /
+--+--+
|
pgbouncer
|
:
public
Internet
:
|
PostgreSQL
------
Europe
What pgbouncer parameters should be set/reset/changed to prevent those idle in transactions?