mirror of
https://github.com/dtzp555-max/ocp.git
synced 2026-07-19 09:44:07 +00:00
Per forensic analysis in #37, the timeout handler at server.mjs:471 called `proc.kill('SIGTERM')` without decrementing the concurrency counter (`stats.activeRequests`). If the subprocess was stuck in a syscall (e.g. MCP I/O) and ignored SIGTERM, its slot was not freed until — and only if — the `proc.on('close')` handler eventually fired after the 5s SIGKILL escalation successfully reaped the child. Real-world observation (#37) shows 3 stuck claude subprocesses running 20 minutes to 2h 45m, exhausting the 8-slot pool and returning `500 concurrency limit reached (8/8)` on every subsequent request. Fix: attach `cleanup` to `proc.once('exit', ...)`. The 'exit' event fires before 'close' and runs on every termination path — normal completion, error, SIGTERM, SIGKILL, crash — even if stdio pipes stay open. `cleanup()` is already idempotent (guarded by `cleaned` flag), so this listener is safe alongside the existing 'close' and 'error' paths that also call it. ALIGNMENT: cli.js has no equivalent subprocess-pool / concurrency- limit logic — cli.js is a single-user CLI, the process being pooled, not the pool itself. Per ALIGNMENT.md Rule 2, this fix is proxy- internal (subprocess lifecycle management) with no cli.js equivalent to cite; documented here instead. No wire-protocol, HTTP surface, or response shape change (Rule 3 preserved). Release kit: bumps version to 3.11.1 and adds CHANGELOG entry so the auto-release workflow tags v3.11.1 on merge. README version refs are feature-gate markers for v3.11.0 (models.json SPOT / auto-sync) and remain historically accurate — no README change needed. Fixes #37. Co-authored-by: dtzp555 <dtzp555@gmail.com>
30 lines
681 B
JSON
30 lines
681 B
JSON
{
|
|
"name": "openclaw-claude-proxy",
|
|
"version": "3.11.1",
|
|
"description": "OCP (Open Claude Proxy) — use your Claude Pro/Max subscription as an OpenAI-compatible API for any IDE. Works with Cline, OpenCode, Aider, Continue.dev, OpenClaw, and more.",
|
|
"type": "module",
|
|
"bin": {
|
|
"openclaw-claude-proxy": "./server.mjs",
|
|
"ocp": "./ocp"
|
|
},
|
|
"scripts": {
|
|
"start": "node server.mjs",
|
|
"setup": "node setup.mjs"
|
|
},
|
|
"keywords": [
|
|
"openclaw",
|
|
"claude",
|
|
"proxy",
|
|
"openai",
|
|
"anthropic"
|
|
],
|
|
"license": "MIT",
|
|
"engines": {
|
|
"node": ">=18"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/dtzp555-max/ocp"
|
|
}
|
|
}
|