- Home
- Skills
- Agents & Orchestration
- Repair Keep-Alive Socket Leaks
Works with the AI tools 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.
$8.99
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.
What you get
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.
How to install
Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 3
Ask your agent to use it
Restart the agent if it was already running. It picks the skill up automatically - no config needed.
Skills folder by agent
Click the path to copy it. Create the folder if it does not exist yet.
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
30-day refund
Not a fit? Get your money back
Trust & safety
Security scanned
Verified clean 1 month ago
- Passed all security checks, Safe to install