Java Heap Memory error

后端 未结 6 1197
遇见更好的自我
遇见更好的自我 2021-01-06 05:40

I am getting this error:

Exception in thread \"main\" java.lang.OutOfMemoryError: Java heap space
    at com.mysql.jdbc.MysqlIO.nextRowFast(MysqlIO.java:1585         


        
6条回答
  •  太阳男子
    2021-01-06 06:28

    I discovered that the MySql driver has a memory leak. I use it with tomcat in a connection pool setup. Loads of JDBCResultSet and StatementImpl objects are in the heap. Setting the maxAge in the datasource configuration (context.xml) in tomcat helped.

提交回复
热议问题