Repository navigation
Detect out of memory errors on all server software - #227
Merged
Merged
Conversation
JulianVennen
approved these changes
Nov 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When Java runs out of memory in the heap or in the Metaspace, the server crashes or stops working.
This was not detected before, neither in server logs nor in crash reports.
This PR adds
OutOfMemoryErrorProblemto theVanillaAnalyserand theMinecraftCrashReportAnalyser, because it is a Java error that can happen on all server software.The memory area is passed to the message as Java logs it (
Java heap spaceorMetaspace), because it is a technical term that is not translated.The solutions depend on the server software, so a Vanilla server is not told to remove plugins.
The analysers replace the problem with a child class through
overridePossibleInsightClass(), like they already do forVanillaVersionInformation:OutOfMemoryErrorProblemPluginOutOfMemoryErrorProblemModOutOfMemoryErrorProblemHybridOutOfMemoryErrorProblemModOutOfMemoryErrorProblemis in the Vanilla namespace, because the mod loaders share it and have no common parent.Spigot, Purpur and Folia crash reports still use the generic crash report analyser and only get the Vanilla solution.
Other kinds of
OutOfMemoryError, likeunable to create native thread, are intentionally not matched, because they have other causes.There is no real log of a mod loader running out of memory yet, so the mod variants are only covered by the analyser registration.
Changes
OutOfMemoryErrorProblem,PluginOutOfMemoryErrorProblem,ModOutOfMemoryErrorProblemandHybridOutOfMemoryErrorProblemIncreaseMemorySolution,PluginMemoryUsageSolutionandModMemoryUsageSolutionpaper-out-of-memory-error-26-3.logandvanilla-out-of-memory-error-26-3.logChanged test expectations
paper-metaspacenow reports the Metaspace error, where it reported no problem before