tomcat7 - jdbc datasource - This is very likely to create a memory leak

主宰稳场 提交于 2019-11-26 20:04:10
Zelldon

Try to put the sql Connector/Driver in the tomcat/lib and not in the war. Because every time you deploy the war the connector/driver will be created sometimes the garbage collector cant remove them which will ends in a memory leak. So try to move the connector on the tomcat/lib folder.

Please read the following answers:

Why must the JDBC driver be put in TOMCAT_HOME/lib folder?

How to configure Tomcat to connect with MySQL

It could be related to this bug in the MySQL jdbc connector: http://bugs.mysql.com/bug.php?id=65909.

You can wait for the MySQL team to fix it, or you try to use the Drizzle JDBC connector which works fine with MySQL (you have just to change the parameter in the url connection) and, in my tests, doesn't have this kind of bug.

I met the same problem just like you ,and I just roll back the pom version of mysql-connector-java from 8.0.16 to 8.0.15 and the problem got resolved,I think it's the unmatch between the version of connector and mysql that caused the problem

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!