Skip to content

fix(lapis): exit the JVM on OutOfMemoryError - #1854

Open
fhennig wants to merge 1 commit into
mainfrom
jvm-exit-on-oom
Open

fix(lapis): exit the JVM on OutOfMemoryError#1854
fhennig wants to merge 1 commit into
mainfrom
jvm-exit-on-oom

Conversation

@fhennig

@fhennig fhennig commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Add -XX:+ExitOnOutOfMemoryError as a default JVM option in the container entrypoint. On OOM the JVM otherwise stays up in a degraded, GC-thrashing state and keeps failing requests until someone restarts it manually (a recent incident left an instance unresponsive for ~19 hours). Exiting lets the orchestrator restart the container.

The option is still overridable through the JVM_OPTS environment variable.

resolves #1848

PR Checklist

  • All necessary documentation has been adapted.
  • All necessary changes are explained in the llms.txt.
  • The implemented feature is covered by an appropriate test.

Add `-XX:+ExitOnOutOfMemoryError` as a default JVM option in the container
entrypoint. On OOM the JVM otherwise stays up in a degraded, GC-thrashing
state and keeps failing requests until someone restarts it manually (a
recent incident left an instance unresponsive for ~19 hours). Exiting lets
the orchestrator restart the container.

The option is still overridable through the JVM_OPTS environment variable.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q5mqrj8VN12QZfxqGNEb1d
@vercel

vercel Bot commented Sep 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
lapis Ready Ready Preview Sep 3, 2026 10:39am UTC

Request Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Complete issue #1848’s remaining requirements or narrow the PR’s issue linkage.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds fail-fast JVM behavior so LAPIS containers restart after an OutOfMemoryError.

Changes:

  • Enables -XX:+ExitOnOutOfMemoryError by default.
  • Preserves overrides through JVM_OPTS.
File summaries
File Description
lapis/entrypoint.sh Adds the OOM-exit option, but does not fulfill issue #1848’s heap-dump and explicit heap-limit requirements.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread lapis/entrypoint.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make LAPIS fail fast on OutOfMemoryError

2 participants