Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. JVM
  3. jvmkill

jvmkill

Apache-2.0C

A JVMTI agent that forcibly terminates the JVM when it cannot allocate memory or create threads.

GitHubGitHub
192 stars44 forks0 contributors

What is jvmkill?

jvmkill is a JVMTI agent that forcibly terminates the Java Virtual Machine when it exhausts critical resources like memory or thread allocation capacity. It solves the problem of JVM instability following `OutOfMemoryError` or thread creation failures by ensuring a clean exit, allowing external process managers to restart the application.

Target Audience

Java developers and system administrators running long-lived JVM applications in production environments where reliability and automatic recovery are critical.

Value Proposition

Developers choose jvmkill because it provides a more reliable alternative to native JVM options, covering both memory and thread allocation failures while remaining compatible with heap dump diagnostics for post-mortem analysis.

Overview

Terminate the JVM when resources are exhausted

Use Cases

Best For

  • Preventing JVM instability after OutOfMemoryError in production
  • Ensuring clean restarts for containerized Java applications
  • Handling thread creation failures that native JVM options ignore
  • Combining heap dump generation with forced termination
  • Improving reliability in memory-constrained environments
  • Automating recovery in process-managed deployments like systemd or Kubernetes

Not Ideal For

  • Development environments where debugging memory leaks requires inspecting the JVM state after an OutOfMemoryError
  • Applications with custom error handling or graceful degradation strategies for resource exhaustion
  • Systems using Java 8u92+ where only OutOfMemoryError is a concern and thread creation failures are negligible
  • Projects prioritizing minimal setup and avoiding external JVMTI agent dependencies

Pros & Cons

Pros

Forced Termination on Failure

Immediately kills the JVM upon OutOfMemoryError or thread creation failure, preventing inconsistent states as described in the README's overview.

Heap Dump Integration

Compatible with -XX:+HeapDumpOnOutOfMemoryError, allowing diagnostic heap dumps before termination, per the README's notes on heap dump compatibility.

Covers Thread Failures

Addresses thread allocation failures that native JVM options like -XX:ExitOnOutOfMemoryError do not handle, based on the alternatives section.

Lightweight Agent

Easily integrated via JVM arguments or environment variables without significant overhead, as shown in the usage instructions.

Cons

No Graceful Error Handling

Forcibly terminates the JVM without allowing application-level recovery or cleanup, which might not suit systems needing controlled degradation.

Requires Compilation and Setup

Needs to be built with a specific JDK and integrated into JVM startup, adding deployment complexity compared to built-in options, as indicated in the building section.

Limited Diagnostic Capabilities

Beyond enabling heap dumps, it doesn't provide additional logging or metrics to diagnose failure root causes, relying solely on termination.

Frequently Asked Questions

Quick Stats

Stars192
Forks44
Contributors0
Open Issues0
Last commit9 days ago
CreatedSince 2015

Tags

#memory-management#reliability#java#thread-management#jvm#system-resources

Built With

C
C++

Included in

JVM2.2k
Auto-fetched 1 day ago

Related Projects

HotswapAgentHotswapAgent

Java unlimited redefinition of classes at runtime.

Stars2,592
Forks523
Last commit3 months ago
DripDrip

Fast JVM launching without the hassle of persistent JVMs.

Stars1,547
Forks71
Last commit5 years ago
CapsuleCapsule

Dead-Simple Packaging and Deployment for JVM Apps

Stars1,145
Forks97
Last commit4 years ago
CRaSHCRaSH

The shell for the Java Platform

Stars0
Forks0
Last commit
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub