Home Tomcat not reusing hanging postgres process
Reply: 0

Tomcat not reusing hanging postgres process

user1641
1#
user1641 Published in July 20, 2018, 1:12 am

I have an issue where basic queries from tomcat app is causing all postgres process to go into "idle in transaction" state.

This is because for some reasons, the queries never gets completed. Relates to application issue and raised issue with developer of the app and they are taking a look.

As tomcat thinks the query is still active, it never does a rollback or commit and hangs.

I am able to kill the "idle in transaction" processes, but tomcat does not automatically clear abandon connections and start new one without having to restart tomcat.

Is there a way to force tomcat to clear the abandoned connection?

 labkey                    |  8195 | 2018-04-17 10:53:17.002785+01 |                        | idle in transaction
 labkey                    |  8359 | 2018-04-17 10:53:16.632977+01 |                        | idle in transaction
 labkey                    |  8249 | 2018-04-17 10:53:16.631433+01 |                        | idle in transaction
 labkey                    |  8250 | 2018-04-17 10:53:17.173161+01 |                        | idle in transaction
 labkey                    |  8251 | 2018-04-17 10:53:16.194544+01 |                        | idle in transaction
 labkey                    |  8358 | 2018-04-17 10:53:16.634106+01 |                        | idle in transaction
 labkey                    |  8362 | 2018-04-17 10:53:14.843128+01 |                        | idle in transaction
 labkey                    |  8382 | 2018-04-17 10:53:15.903067+01 |                        | idle in transaction
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.244752 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO