hotfix: Fixed 'idle in transaction' connections when loading entityLog #287

Merged
dominique.eiflaender1 merged 1 commits from connectionHotfix into master 2023-12-22 11:09:42 +01:00
dominique.eiflaender1 commented 2023-12-22 10:57:38 +01:00 (Migrated from gitlab.knecon.com)

Transactions will block connections in persistence-service.
You can see that when you execute 'SELECT * FROM pg_stat_activity;' in the database. The state of the connection will. be 'idle in transcaction'
Having @Transcation annotations on havily called endpoints will lead to this exception

java.sql.SQLTransientConnectionException: jdbc:postgresql://postgresql:5432/tenantmanager?ApplicationName=persistence-service-multitenantDataSource - Connection is not available, request timed out after 30000ms.
at com.zaxxer.hikari.pool.HikariPool.createTimeoutException(HikariPool.java:696)
at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:181)

That makes the entire system unusable. Please keep that in mind, whenever you add a @Transaction annotation.

Transactions will block connections in persistence-service. You can see that when you execute 'SELECT * FROM pg_stat_activity;' in the database. The state of the connection will. be 'idle in transcaction' Having @Transcation annotations on havily called endpoints will lead to this exception java.sql.SQLTransientConnectionException: jdbc:postgresql://postgresql:5432/tenantmanager?ApplicationName=persistence-service-multitenantDataSource - Connection is not available, request timed out after 30000ms. at com.zaxxer.hikari.pool.HikariPool.createTimeoutException(HikariPool.java:696) at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:181) That makes the entire system unusable. Please keep that in mind, whenever you add a @Transaction annotation.
dominique.eiflaender1 commented 2023-12-22 10:57:38 +01:00 (Migrated from gitlab.knecon.com)

assigned to @dominique.eiflaender1

assigned to @dominique.eiflaender1
ali.oezyetimoglu1 (Migrated from gitlab.knecon.com) approved these changes 2023-12-22 10:57:38 +01:00
andrei.isvoran.ext (Migrated from gitlab.knecon.com) approved these changes 2023-12-22 10:57:38 +01:00
ali.oezyetimoglu1 commented 2023-12-22 11:01:46 +01:00 (Migrated from gitlab.knecon.com)

approved this merge request

approved this merge request
andrei.isvoran.ext commented 2023-12-22 11:02:57 +01:00 (Migrated from gitlab.knecon.com)

approved this merge request

approved this merge request
dominique.eiflaender1 (Migrated from gitlab.knecon.com) merged commit e4f1a04220 into master 2023-12-22 11:09:42 +01:00
dominique.eiflaender1 commented 2023-12-22 11:09:43 +01:00 (Migrated from gitlab.knecon.com)

mentioned in commit e4f1a04220

mentioned in commit e4f1a04220a9c85579728438fc596989d6f1db10
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Marmelator/persistence-service#287
No description provided.