老问题,没解决。求高手帮忙,万分感激。
问题描述:
1.web工程,ssh框架,c3p0连接池,firebird数据库,extjs前台框架。
2.工程访问人数不多,最多20多个,但是每次访问的数据量很大。
3.虽然数据量大,但是数据库的操作很简单,全程存储过程,所有数据访问都是同步ajax。
4.如果一直操作、访问,那么不会有任何问题。
5.任何一个访问者,就算当前只有一个人来访问,如果查询了数据后长时间不动也不关闭网页就会出现tomcat死掉的情况。
6.tomcat死掉状况:(tomcat、数据库、cs工程分别在不同的服务器上)
a.访问web工程,提示浏览器无法打开该网页。
b.访问tomcat管理页,提示浏览器无法打开网页。
c.在tomcat所在服务器上用数据库访问工具连接数据库,提示"系统缓冲区空间不足或队列已满、无法执行套接字操作"。
d.数据库和cs工程可以正常运行。
e.需要重起tomcat所在服务器。
以前针对这个问题已经发了一个帖子,但是没能解决问题,在以前的那个帖子中,朋友们提供的思路都试过了,问题还在存在。针对以前的帖子,这里贴出一部分配置文件、源码和日志。
web.cfg
- XML code
<!-- HIBERNATE 延迟加载 --> <filter> <filter-name>hibernateFilter</filter-name> <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class> </filter> <filter-mapping> <filter-name>hibernateFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <!-- SPRING 加载 --> <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:applicationContext.xml;</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener>
hibernate.cfg.xml配置文件:
- XML code
<property name="hibernate.dialect">org.hibernate.dialect.FirebirdDialect</property> <property name="connection.driver_class">org.firebirdsql.jdbc.FBDriver</property> <property name="connection.url">jdbc:firebirdsql:10.106.115.2/3050:pim</property> <property name="connection.username">SYSDBA</property> <property name="connection.password">masterkey</property> <!-- 配置连接池 --> <property name="hibernate.c3p0.acquire_increment">1</property> <property name="hibernate.c3p0.idle_test_period">100</property> <!-- seconds --> <property name="hibernate.c3p0.max_size">10</property> <property name="hibernate.c3p0.max_statements">50</property> <property name="hibernate.c3p0.min_size">3</property> <property name="hibernate.c3p0.timeout">300</property> <!-- milliseconds --> <property name="connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property> <!-- 其他 --> <property name="show_sql">true</property> <property name="format_sql">true</property> <property name="current_session_context_class">thread</property> <!-- 二级缓 --> <property name="hibernate.cache.use_second_level_cache">true</property> <property name="hibernate.cache.use_query_cache">true</property> <property name="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</property> <property name="hibernate.generate_statistics">true</property>
spring配置文件:
- XML code
<!-- 配置 sessionFactory --> <bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"> <property name="configLocations" value="classpath:hibernate.cfg.xml" /> <property name="packagesToScan" value="com.tljw.table.bean" /> </bean> <!-- 配置事务管理 --> <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory"> <ref bean="sessionFactory" /> </property> </bean>