struts2+hibernate+spring+proxool性能问题

项目已经跑了2个多月了,今天突然出现不能访问的问题。
第一开始是访问一直刷不出页面,但是tomcat控制台却一下一下的在执行,(很慢的执行,很久才输出一条hibernate的语句)

之后将所有的应用重启了一次,
依然访问不了网站。

一直让他持续连接就会给我报错。
[code="java"]

2009-09-24 11:47:12 [org.logicalcobwebs.proxool.BESTVDB]-[WARN] #0008 was active for 1939871 milliseconds and has been removed automaticaly. The Thread responsible was named 'http-8080-Processor45', and the last SQL it performed is 'select iptvaction0_.action_id as action1_, iptvaction0_.uid as uid11_, iptvaction0_.username as username11_, iptvaction0_.con as con11_, iptvaction0_.cat as cat11_, iptvaction0_.friend_id as friend6_11_, iptvaction0_.friendname as friendname11_, iptvaction0_.code as code11_, iptvaction0_.state_id as state9_11_, iptvaction0_.remark as remark11_, iptvaction0_.datetime as datetime11_, iptvaction0_.allowed as allowed11_, iptvaction0_.visable as visable11_, iptvaction0_.action_place as action14_11_ from iptv_action iptvaction0_ where iptvaction0_.uid in (select iptvmyfrie1_.friendid from iptv_myfriends iptvmyfrie1_ where iptvmyfrie1_.uid=723) order by iptvaction0_.datetime desc limit 3; '.
2009-09-24 11:47:12 [org.hibernate.transaction.JDBCTransaction]-[ERROR] Could not toggle autocommit
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.Util.getInstance(Util.java:381)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:985)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)
at com.mysql.jdbc.ConnectionImpl.checkClosed(ConnectionImpl.java:1113)
at com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:4790)
at sun.reflect.GeneratedMethodAccessor126.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.logicalcobwebs.proxool.WrappedConnection.invoke(WrappedConnection.java:162)
at org.logicalcobwebs.proxool.WrappedConnection.intercept(WrappedConnection.java:87)
at com.mysql.jdbc.Connection$$EnhancerByProxool$$6a89ac94.setAutoCommit()
at org.hibernate.transaction.JDBCTransaction.toggleAutoCommit(JDBCTransaction.java:174)
at org.hibernate.transaction.JDBCTransaction.commitAndResetAutoCommit(JDBCTransaction.java:122)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:95)
at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:578)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:662)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:632)
[/code]

[code="java"]

javax.servlet.ServletException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.TransactionException: JDBC begin failed:
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515)
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)
org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)

root cause

org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.TransactionException: JDBC begin failed:
org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:541)
org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:350)

root cause

org.hibernate.TransactionException: JDBC begin failed:
org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:58)
org.hibernate.transaction.JDBCTransactionFactory.beginTransaction(JDBCTransactionFactory.java:24)
org.hibernate.jdbc.JDBCContext.beginTransaction(JDBCContext.java:271)
org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1079)
org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:510)

root cause

java.sql.SQLException: Couldn't perform the operation getAutoCommit: You can't perform any operations on this connection. It has been automatically closed by Proxool for some reason (see logs).
org.logicalcobwebs.proxool.WrappedConnection.invoke(WrappedConnection.java:207)
org.logicalcobwebs.proxool.WrappedConnection.intercept(WrappedConnection.java:87)
com.mysql.jdbc.ConnectionProperties$$EnhancerByProxool$$9313bf3c.getAutoCommit()
org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:49)
org.hibernate.transaction.JDBCTransactionFactory.beginTransaction(JDBCTransactionFactory.java:24)
org.hibernate.jdbc.JDBCContext.beginTransaction(JDBCContext.java:271)

[/code]
异常信息大概如上所示。
找不到头绪。
不知道该如何下手去优化?还是?
我该如何做?

这是我的第一个项目。还希望各位前辈给出指点!谢谢!

1个回答

No operations allowed after connection closed.

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问