从一台服务器迁移到另一台服务器tomcat启动报内存溢出,操作系统,jdk,tomcat版本都一样,可是就是启动报错
Mar 09, 2018 6:43:12 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
SEVERE: The web application [/ocd] registered the JDBC driver [com.alibaba.druid.mock.MockDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Mar 09, 2018 6:43:12 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
SEVERE: The web application [/ocd] 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.
Mar 09, 2018 6:43:12 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
SEVERE: The web application [/ocd] registered the JDBC driver [com.mysql.fabric.jdbc.FabricMySQLDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Mar 09, 2018 6:43:12 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
SEVERE: The web application [/ocd] 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.
Mar 09, 2018 6:43:12 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
SEVERE: The web application [/ocd] appears to have started a thread named [FileWatchdog] but has failed to stop it. This is very likely to create a memory leak.
Mar 09, 2018 6:43:12 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
SEVERE: The web application [/ocd] 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.
Mar 09, 2018 6:43:12 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
SEVERE: The web application [/ocd] appears to have started a thread named [Thread-2] but has failed to stop it. This is very likely to create a memory leak.
Mar 09, 2018 6:43:12 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
SEVERE: The web application [/ocd] appears to have started a thread named [schedulerFactory_Worker-1] but has failed to stop it. This is very likely to create a memory leak.
Mar 09, 2018 6:43:12 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
SEVERE: The web application [/ocd] appears to have started a thread named [schedulerFactory_Worker-2] but has failed to stop it. This is very likely to create a memory leak.
Mar 09, 2018 6:43:12 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
SEVERE: The web application [/ocd] appears to have started a thread named [schedulerFactory_Worker-3] but has failed to stop it. This is very likely to create a memory leak.
Mar 09, 2018 6:43:12 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
SEVERE: The web application [/ocd] appears to have started a thread named [schedulerFactory_Worker-4] but has failed to stop it. This is very likely to create a memory leak.
Mar 09, 2018 6:43:12 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
SEVERE: The web application [/ocd] appears to have started a thread named [schedulerFactory_Worker-5] but has failed to stop it. This is very likely to create a memory leak.
两台机器的内存一样吗?如果一样再看一下tomcat的配置文件(bin 目录下的catalina.sh)一样吗?
重点看一下JAVA_OPTS的配置,如服务器为1G内存的配置:
JAVA_OPTS=”-server -Xms800m -Xmx800m -XX:PermSize=64M -XX:MaxNewSize=256m -XX:MaxPermSize=128m"
-Xms
设置虚拟机可用内存堆的初始大小,缺省单位为字节,该大小为1024的整数倍并且要大于1MB,可用k(K)或m(M)为单位来设置较大的内存数。初始堆大小为2MB。加“m”说明是MB,否则就是KB了。
例如:-Xms6400K,-Xms256M
-Xmx
设置虚拟机的最大可用大小,缺省单位为字节。该值必须为1024整数倍,并且要大于2MB。可用k(K)或m(M)为单位来设置较大的内存数。缺省堆最大值为64MB。
例如:-Xmx81920K,-Xmx80M
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。