You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've done a bit of a deep dive on why we were seeing Java heap OOM errors on Cantaloupe, and it seems to come down to Java's garbage collector being unable to clean up JNI-initiated memory-pinned objects. If I understand that right.
JDK22+ has region pinning which may address the issue, so there's a possible reason to upgrade.
Unfortunately, JDK21 is the current LTS, so it's probably not a great idea to use it currently.
I'm testing other fixes, like increasing GCLockerRetryAllocationCount to give the GC more chances to clear up unused memory.
edit: I haven't confirmed that this actually resolves the problem, but if the above change doesn't resolve my issue or at least paper over it, I'll work on that. This issue is probably more informational than prescriptive.
The text was updated successfully, but these errors were encountered:
Just to update this issue: we discussed this in the tech call. We will eventually want to update JDK, but will require updating our base java image which all java based images inherit from so will be a bigger lift than just updating for cantaloupe.
Rob and I spoke a bit about the underlying problem around this issue on Slack and there may be some other performance improvements to try to get around the issue in the meantime.
Rob, if you want to test your garbage collection hypothesis we could maybe build a special jdk22 version of cantaloupe and push it somewhere if you want to experiment with the new garbage collection features in jdk22?
I've done a bit of a deep dive on why we were seeing Java heap OOM errors on Cantaloupe, and it seems to come down to Java's garbage collector being unable to clean up JNI-initiated memory-pinned objects. If I understand that right.
JDK22+ has region pinning which may address the issue, so there's a possible reason to upgrade.
Unfortunately, JDK21 is the current LTS, so it's probably not a great idea to use it currently.
I'm testing other fixes, like increasing
GCLockerRetryAllocationCount
to give the GC more chances to clear up unused memory.edit: I haven't confirmed that this actually resolves the problem, but if the above change doesn't resolve my issue or at least paper over it, I'll work on that. This issue is probably more informational than prescriptive.
The text was updated successfully, but these errors were encountered: