javaperf memory leak

    1

    Hunts Java memory leaks with heap histograms, old-object samples, and the javaperf MCP server.

    Free

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+22 more

    javaperf memory leak

    Example session with this skill installed

    My Java app at PID 4502 is slowly climbing in memory. It has been up for 4 hours and GC isn't helping. Can you find what's leaking?

    • Read your context and instructions
    • Compiled the javaperf memory leak

    I have analyzed the heap histogram deltas and JFR old object samples for PID 4502 over a 60-second window. The data shows a consistent growth in com.example.session.UserSession objects that are not being reclaimed.

    Leak Analysis for PID 4502

    Class NameΔ InstancesΔ BytesConsistent?
    com.example.session.UserSession+1,420+227,200Yes (3/3)
    java.util.concurrent.ConcurrentHashMap$Node+1,420+45,440Yes (3/3)
    char[]+2,840+181,760Yes (3/3)

    Allocation Origin:
    JFR profiling shows these objects are instantiated via com.example.auth.SessionManager.createSession during incoming HTTP requests.

    Retention Hypothesis:
    The UserSession objects are being added to a static ConcurrentHashMap inside SessionManager. While a cleanup task exists, the GC efficiency report shows par new and concurrent mark sweep cycles are reclaiming 0% of these specific instances, suggesting the "remove" logic is failing or the TTL is effectively infinite.

    Confidence: High. The instance count for the Map nodes exactly matches the UserSession growth.

    Next steps

    1. Inspect SessionManager.java at line 84 to verify the eviction policy on the static map.
    2. Check if SessionExpiredEvent listeners are correctly removing entries.
    3. If the code looks correct, run heap_dump to confirm the exact GC root path in Eclipse MAT.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Hunts Java memory leaks by comparing live heap histograms over time, recording old-object samples, and building a retention hypothesis, with an optional heap dump for Eclipse MAT, via the javaperf MCP server. Use when the user says heap keeps growing, memory never comes back after GC, the app OOMs after hours or days, or asks to find a memory leak.

    How to use

    Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free forever

    No account required to browse

    Trust & safety

    Security scanned

    Verified clean 5 days ago

    • Free to download with an account

    Requires

    Node.js
    Jperf MCP

    Listed5 days ago

    What's inside

    Frequently Asked Questions