服务运行一段时间就死掉
log信息
2012-09-25 12:30:49,437 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively releasing JDBC connection
2012-09-25 12:30:49,437 DEBUG [org.hibernate.impl.SessionImpl] disconnecting session
2012-09-25 12:30:49,453 DEBUG [org.springframework.orm.hibernate3.support.OpenSessionInViewFilter] Closing single Hibernate Session in OpenSessionInViewFilter
2012-09-25 12:30:49,453 DEBUG [org.springframework.orm.hibernate3.SessionFactoryUtils] Closing Hibernate Session
2012-09-25 12:30:55,000 DEBUG [org.springframework.orm.hibernate3.support.OpenSessionInViewFilter] Using SessionFactory 'sessionFactory' for OpenSessionInViewFilter
2012-09-25 12:30:55,000 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'sessionFactory'
2012-09-25 12:30:55,000 DEBUG [org.springframework.orm.hibernate3.support.OpenSessionInViewFilter] Opening single Hibernate Session in OpenSessionInViewFilter
2012-09-25 12:30:55,000 DEBUG [org.springframework.orm.hibernate3.SessionFactoryUtils] Opening Hibernate Session
2012-09-25 12:30:55,000 DEBUG [org.hibernate.impl.SessionImpl] opened session at timestamp: 13485438550
每次都是死在 opened session at timestamp这块,为啥?从log看session已经每次都关了,而且connection也全部release
hibernate的配置
<property name="dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
<property name="show_sql">true</property>
<property name="format_sql">true</property>
<property name="use_sql_comments">true</property>
<property name="connection.release_mode">after_transaction</property>
<property name="maxActive">100</property>
<property name="maxIdle">30</property>
<property name="maxWait">-1</property>
web.xml
<filter>
<filter-name>osivFilter</filter-name>
<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
<init-param>
<param-name>singleSession</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>osivFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
2012-09-25 12:30:49,437 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively releasing JDBC connection
2012-09-25 12:30:49,437 DEBUG [org.hibernate.impl.SessionImpl] disconnecting session
2012-09-25 12:30:49,453 DEBUG [org.springframework.orm.hibernate3.support.OpenSessionInViewFilter] Closing single Hibernate Session in OpenSessionInViewFilter
2012-09-25 12:30:49,453 DEBUG [org.springframework.orm.hibernate3.SessionFactoryUtils] Closing Hibernate Session
2012-09-25 12:30:55,000 DEBUG [org.springframework.orm.hibernate3.support.OpenSessionInViewFilter] Using SessionFactory 'sessionFactory' for OpenSessionInViewFilter
2012-09-25 12:30:55,000 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] Returning cached instance of singleton bean 'sessionFactory'
2012-09-25 12:30:55,000 DEBUG [org.springframework.orm.hibernate3.support.OpenSessionInViewFilter] Opening single Hibernate Session in OpenSessionInViewFilter
2012-09-25 12:30:55,000 DEBUG [org.springframework.orm.hibernate3.SessionFactoryUtils] Opening Hibernate Session
2012-09-25 12:30:55,000 DEBUG [org.hibernate.impl.SessionImpl] opened session at timestamp: 13485438550
每次都是死在 opened session at timestamp这块,为啥?从log看session已经每次都关了,而且connection也全部release
hibernate的配置
<property name="dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
<property name="show_sql">true</property>
<property name="format_sql">true</property>
<property name="use_sql_comments">true</property>
<property name="connection.release_mode">after_transaction</property>
<property name="maxActive">100</property>
<property name="maxIdle">30</property>
<property name="maxWait">-1</property>
web.xml
<filter>
<filter-name>osivFilter</filter-name>
<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
<init-param>
<param-name>singleSession</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>osivFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
...全文
相关推荐
Oracle实例死掉的情况下如何恢复
可以通过`ps -ef | grep pmon`命令列出所有正在运行的实例及其进程ID。
mysql连接过多和死掉以及拒绝服务的解决方法
这些方法可以帮助解决 MySQL 连接过多和死掉以及拒绝服务的问题,确保数据库服务的稳定运行。
线程超时死掉
解决线程的死掉问题和超时问题特别好使,在Java中,如果需要设定代码执行的最长时间,即超时,可以用Java线程池ExecutorService类配合Future接口来实现。 Future接口是Java
贪吃蛇游戏开发_吃到石头死掉功能
为此,我们需要一个`GameManager`类来跟踪游戏状态,如是否正在运行、分数是多少等。4.
VC编译器死掉(5)
<br>在用vc6.0编译程序时,有时会出现编译器死机的情况,而且只要遇到过一次,以后死掉情况的频率会越来越大,此时安装这个软件,不用卸载vc,只要把本软件解压后直接运行exe文件就好了<br><br


