-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
H2 database randomly throwing StackOverflowError #4026
Comments
From the stack trace provided, it seems like a normal operation, but on extremely dis-balanced (very deep) B-tree. It is possible to get such tree with some specific pattern of updates and deletes, since H2 does not make any efforts to keep tree balanced. On the other hand, it is highly unlike scenario. |
Hello @andreitokar , Thanks for the reply. Indeed we have considered increasing JVM stack size to 2MB instead of the default 256KB. Would you recommend a different value for the increase? Thanks again. |
Is this fault only happening on one machine? Or can you reproduce on another machine? If it is just one machine it is possible you have dodgy hardware, which under load corrupts stuff. |
Just try 512KB to see if it helps, quite likely that it will not. I am really having a hard time imagining scenario where b-tree gets distorted that much, but who knows… |
We have an H2 database in Server mode and with no apparent reason performing a flush results in an H2 error having java.lang.StackOverflowError as root exception. We already reported this issue last year and an upgrade was suggested, but it doesn't seem to have fixed the bug, hence the new issue we are just creating. For more details on last year's issue, see #3732 . Another issue was also created in-between; #3740 . For this issue, we removed the CLOB data type from all our tables and replaced it by another suitable one (JSON).
Current H2 version: 2.2.224
Current .db file size when the error occurs: around 300 MB
In the attached file you can find an example of the error logs we are currently observing.
error_sample.log
The text was updated successfully, but these errors were encountered: