OOM in sqlBuffer, help!

35 views
Skip to first unread message

MC D

unread,
Jul 11, 2023, 10:49:24 PM7/11/23
to mybatis-user
version: 3.5.3

Here are very big sql because it has to many param after 'in' keyword like this. All line count is 1400000, so it has 75MB.

I use eclipse MAT tool, find it is sqlBuffer in class FilteredDynamicContext and it is unreachable. Everytime I change any sql condition, it will produce other about 200MB char array.  So OOM will be reproduced if I trigger about 5 times when I set JVM max memory to 1GB.

I know the sql statement is not suitable because I shouldn't put big data after 'in'. But I want to know why the char array in sqlBuffer it is unreachable? Why it cannot be recovery auto by JVM? Is it a mybatis bug or any config can resolve? It is very important for out prod environment because I need to avoid it occur again.

WX20230712-102033@2x.png

WX20230712-101547@2x.png
WX20230712-101600@2x.png

Iwao AVE!

unread,
Jul 15, 2023, 5:48:16 AM7/15/23
to mybati...@googlegroups.com
Hello,

Could you provide a small repro project?
We may also need instruction about JVM configuration to reproduce the issue (how you change the max memory, etc.).

Regards,
Iwao

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mybatis-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/2c8a0cfe-d803-4bb5-9a28-652fade90a2en%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages