1. 程式人生 > >This is very likely to create a memory leak 異常

This is very likely to create a memory leak 異常

INFO [cn.com.ksplatform.core.expand.spring.SpringContext] - Closing Root WebApplicationContext: startup date [Mon Dec 12 18:31:08 CST 2016]; root of context hierarchy
INFO [com.alibaba.druid.pool.DruidDataSource] - {dataSource-2} closed
INFO [com.alibaba.druid.pool.DruidDataSource] - {dataSource-1} closed
Dec 12, 2016 6:35:37 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
SEVERE: The web application [/emplatform] registered the JDBC driver [com.alibaba.druid.proxy.DruidDriver] but failed to unregister it when the web application was stopped.
To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Dec 12, 2016 6:35:37 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
SEVERE: The web application [/emplatform] 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.
Dec 12, 2016 6:35:37 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
SEVERE: The web application [/emplatform] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it.
This is very likely to create a memory leak.
Dec 12, 2016 6:35:37 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-bio-9001"]
Dec 12, 2016 6:35:37 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["ajp-bio-8012"]
Dec 12, 2016 6:35:37 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-9001"]
Dec 12, 2016 6:35:37 PM org.apache.coyote.AbstractProtocol destroy

INFO: Destroying ProtocolHandler ["ajp-bio-8012"]

原因;

記憶體分配不夠

解決辦法:tomcat目錄下,修改bin/catalina.sh檔案,新增以下語句:

JAVA_OPTS="-server -Xms768m -Xmx768m -XX:PermSize=128m"