我正在使用Hibernate 4,PostgreSQL和C3P0。
I am using Hibernate 4, PostgreSQL and C3P0.
在我的Web应用程序中,一段时间后,我在数据库中收到多个 SHOW TRANSACTION ISOLATION LEVEL 查询,这是由于我服务器挂起。在我的代码中,我所有的连接均已正确关闭。
In my web application, after sometime I am getting multiple SHOW TRANSACTION ISOLATION LEVEL queries in database due to which my server gets hang. In my code all my connections are properly closed.
是由于连接泄漏引起的吗?
Is it due to a connection leak?
推荐答案您还应该检查每个查询的状态,如果它是 idle 没问题。
You should also check the state of each query, if it's idle it's most likely nothing problematic.
pg_stat_activity 将显示每个打开的连接所执行的最后一个查询。 c3p0使用 SHOW事务隔离级别保持连接打开(正常行为和预期行为)。
pg_stat_activity will show last query that was executed by each open connection. And c3p0 uses SHOW TRANSACTION ISOLATION LEVEL to keep the connection open (normal and expected behavior).
这是什么发生:
更多推荐
postgres中的很多SHOW TRANSACTION ISOLATION LEVEL查询
发布评论