最近网站总是访问一两天就当掉了,返回503异常,网站框架是struts2.0+spring+ibatis 数据库是mysql,服务器是tomcat7
看tomcat的日志有这么一段信息
2011-10-19 15:47:27 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
2011-10-19 15:47:27 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [] appears to have started a thread named [Thread-3] but has failed to stop it. This is very likely to create a memory leak.
2011-10-19 15:47:27 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak.
2011-10-19 15:47:27 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [] is still processing a request that has yet to finish. This is very likely to create a memory leak. You can control the time allowed for requests to finish by using the unloadDelay attribute of the standard Context implementation.
警告: An attempt was made to authenticate the locked user "tomcat"
2011-10-17 23:30:15 org.apache.catalina.realm.LockOutRealm authenticate
警告: An attempt was made to authenticate the locked user "admin"
2011-10-17 10:22:40 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@8a7673]) and a value of type [com.ibatis.sqlmap.engine.mapping.result.ResultObjectFactoryUtil.FactorySettings] (value [com.ibatis.sqlmap.engine.mapping.result.ResultObjectFactoryUtil$FactorySettings@1190099]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. 

解决方案 »

  1.   

    tomcat server。xml里面的这个lisnter你注释掉试一下
    JreMemoryLeakPreventionListener
      

  2.   


    我查到过这个解决方法,但是说这个只是TOMCAT7增加的东西,去掉了虽然不报这个错了,但是程序问题还是存在的,有没有解决这个问题的方法?
      

  3.   


    我查到过这个解决方法,但是说这个只是TOMCAT7增加的东西,去掉了虽然不报这个错了,但是程序问题还是存在的,有没有解决这个问题的方法?
      

  4.   

    有非常高的可能:
    1、程序存在数据库连接泄漏;
    2、程序存在数据库特定资源死锁。需要仔细检查代码,必要时上JProfiler之类的工具,也可以从MySQL中查找问题的session。
      

  5.   

    <style type="text/css"><!--
    .box{margin:20px auto;width:90%;height:auto;border-top:1px dotted red;border-bottom:1px dashed green;}
    --></style>
    <div class="box">
        
        不懂
        
        </div>