开发者社区> 问答> 正文

从一台服务器迁移到另一台服务器tomcat启动报内存溢出的问题

从一台服务器迁移到另一台服务器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.

展开
收起
1645300388469010 2018-03-10 15:01:48 3916 0
1 条回答
写回答
取消 提交回答
  • 两台机器的内存一样吗?如果一样再看一下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

    2019-07-17 22:01:16
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
内存取证与IaaS云平台恶意行 为的安全监控 立即下载
云服务器ECS内存增强型实例re6全新发布 立即下载
服务器迁移到阿里云的step by step 立即下载