服务运行一段时间就死掉

yashucn yashucn 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
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>
...全文

相关推荐

评论 3
收藏 已收藏
分享
返回顶部
yashucn
Java EE 67,535 成员 225,843 内容