NewSchokr 13 is here. A whole new UI, seven locations, snapshots and more. Read more →

How to fix out of memory (OOM) crashes on Schokr

Your Schokr server stops without an error or shows exit code 137? It is probably running out of memory. Here is how to confirm and fix it.

Updated · 2 min read

If your server suddenly stops with no error in its own logs, or the console mentions being killed or exit code 137, it most likely hit its memory limit. Each server can only use the memory you assign it, and going over gets the process killed.

Signs it is a memory problem

  • The server stops without a crash report or stack trace.
  • The console mentions the process was killed, or exit code 137.
  • Memory usage in the console climbs to the limit right before it stops.
  • Java prints java.lang.OutOfMemoryError.
  • Node.js prints JavaScript heap out of memory.
  • Python prints MemoryError, or the process is just killed.

Quick fixes

  1. Give it more memory. Raise the limit in the Resources section, taking it from another server if the pool is full. See changing resources.
  2. Restart regularly. Many servers slowly use more memory over days. A daily restart helps. See schedules.
  3. Reduce the load. Fewer plugins, lower view distance, fewer loaded chunks or a smaller bot cache all help.

Java servers (Minecraft and others)

Java uses memory outside its heap too: for threads, the JIT compiler, native libraries and more. If the heap is allowed to use the entire container limit, the total goes over and the process is killed, even though Java never reports an OutOfMemoryError.

  • Keep the heap below the container limit. Schokr templates set the heap from your memory limit, so avoid editing the startup command to use a larger -Xmx.
  • For Minecraft, lowering view-distance and simulation-distance in server.properties reduces memory use:
view-distance=8
simulation-distance=6
  • Pre-generating the world with a plugin, at a quiet time, avoids memory spikes from players exploring new chunks.
  • Modded servers need much more memory than Paper. Check the modpack's recommended amount.

Node.js and Bun bots

  • Large discord.js bots can cache many members and messages. Limit caches with the client's cache options (see discord.js.org).
  • Look for memory leaks: arrays or maps that grow forever, event listeners added on every command, intervals never cleared.
  • Watch memory over time in the console. Steady growth means a leak, not just a busy bot.

Python bots

  • Avoid loading whole files or large API responses into memory at once.
  • With discord.py, only enable the intents you need, since more intents means more cached data. See discordpy.readthedocs.io.
  • Store data in SQLite instead of keeping everything in Python lists and dicts.

How much memory is enough?

Watch usage at your busiest time and give at least 15 to 25% more than the peak. If your pool is too small for everything you run, you can buy 1 GB memory for 450 credits in the store.

Still stuck?

Post your template, memory limit and a screenshot of the memory graph before the crash in the Schokr Discord.