- Home
- Skills
- Agents & Orchestration
- Repair Keep-Alive Socket Leaks
More screenshots
Works with the AI Agents you already use
Repair Keep-Alive Socket Leaks
Repair HTTP keep-alive lifecycle bugs that leak sockets, exhaust pools, or cause intermittent resets after idle periods and deploys.
$1
Repair Keep-Alive Socket Leaks
Example session with this skill installed
Our Node.js API gets ECONNRESET after idle periods. We use Axios with keep-alive. Find the leak, fix the cleanup logic, and add a test for stale socket recovery.
- Read your context and instructions
- Compiled the repair keep-alive socket
I have modified src/clients/http.ts to align idle timeouts with your 60s load balancer limit and added a finally block for stream cleanup. Local tests confirm 100% socket reuse and successful recovery after synthetic connection resets. No infrastructure changes were made.
Connects securely to your tools. The creator never sees your data.
About this skill
The problem
Your application suffers from intermittent ECONNRESET errors, socket hang-ups, or rising file descriptor counts that eventually exhaust your connection pool. These issues often appear after idle periods or upstream deployments because the HTTP client lifecycle doesn't align with the infrastructure's timeout boundaries.
What it does
- Identifies leaked HTTP clients and unconsumed response bodies that cause pool exhaustion.
- Synchronizes client-side idle timeouts with upstream load balancer and proxy boundaries.
- Implements cancellation-safe cleanup to prevent stranded sockets after aborted requests.
- Establishes deterministic regression tests for connection reuse and recovery.
- Standardizes client ownership to prevent per-request agent construction.
Frameworks & tools
Works with any repository using standard HTTP clients like Axios, node-fetch, httpx, requests, or aiohttp. Utilizes Bash for local verification and repository-specific testing frameworks.
Why this beats prompting it yourself
Generic AI advice often suggests simply increasing pool sizes, which only masks leaks. This skill enforces a strict connection contract, tracing ownership from construction to shutdown and proving the fix with local synthetic fixtures that simulate upstream failures.
Use cases
- Fixing first-request failures that occur after service idle periods.
- Stopping memory and file descriptor growth in long-running worker processes.
- Ensuring streaming responses release sockets even when a consumer aborts early.
- Hardening clients against
ECONNRESETduring upstream rolling deployments.
Known limitations
Cannot modify production infrastructure like load balancers or DNS settings. Does not support automatic retries for non-idempotent requests unless a safety contract is already present in the code.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Agents & Orchestration.
Requires local repository access. Cannot change infrastructure. Synthetic tests don't guarantee production behavior. Scope limited to client-layer logic.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 3 months ago
Permissions
Read is used to inspect HTTP client construction, request/response lifecycle, cancellation, retries, and tests. Write is used for bounded repository repairs and regression tests. Terminal/Shell is used only for local, repository-supported verification. No unrestricted browser, external network, environment-variable, or production infrastructure access is required.