Hi, I have a problem where my application sometimes locks with a really high number of "Idle in Transaction"s. The application is heavily used, and some transactions are quite large. However, in the worst case scenario, these long transactions shouldn't be more than 10 at the same time. My max pool size is of 120. When I reach the point where these "Idle in Transaction"s start adding up, I quickly reach the 120 transactions and the application no longer responds. Actually, it stops responding when it starts increasing the number of transactions.

My question is, what could cause a transaction never to end? I read somewhere that having autovaccum on the DB while the DB is heavily accesed could cause, and I quote:

"I think this problem occurs while a (auto) vacuum is running and there is
high traffic on the database. It leads sometimes to an inconsisten database
with double primary keys in a table or a broken unique indexes (
"pg_statistic_relid_att_index" for instance). I can't enforce this error."

I use PostgreSQL. Do you have any ideas?

Subir, organizar y compartir documentos online, está a un clic de tu bandeja de entrada. Ver más