Skip to content
Hosting · Error breakdowns

StackOverflowError

Infinite recursion in a plugin or mod: what it looks like, what most often causes it, and why the server crashes after it.

Updated August 13, 2026

java.lang.StackOverflowError
    at com.example.plugin.Handler.process(Handler.java:88)
    at com.example.plugin.Handler.process(Handler.java:92)
    at com.example.plugin.Handler.process(Handler.java:88)
    ...

Repeating identical lines in the stack are a sign of infinite recursion: the code calls itself until the stack runs out.

Common causes

SituationExample
Plugins that trigger each other's eventsPlugin A catches an event and calls an action that fires the same event
A chat plugin that processes its own outputMessage → filter → message
Scripts — SkriptAn event calls a command that calls the event
Custom recipes and itemsA craft that produces a craft

What to do

  1. Find the top class in the stack — that's the culprit.
  2. If it's a pair of plugins, remove one and test.
  3. In scripts, look for a loop: it's usually obvious once you know where to look.

After the error

The thread where it happened terminates. If that's the main thread, the server crashes or freezes. A restart is mandatory: you can't keep running after a StackOverflow — Server crashed.

Minecraft hostingYour server runs while you are offlineCreate server