Java Heap Memory error

后端 未结 6 1241
遇见更好的自我
遇见更好的自我 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:18

    You don't need to worry about -Xms too much - that's the initial Heap size on startup.

    -Xmx is the max Heap size. Try increasing it until either you don't get the OutOfMemory exception anymore, or until you run out of memory.

    If you run out of memory, you can't load the entire ResultSet at once, and you'll need to apply the approaches that others have mentioned.

提交回复
热议问题