Raise watcher ready timeout 60s -> 150s for slow-plugin installs
A CODESYS install launched with --additionalfolder that registers a large add-on set boots far slower than a bare install. SP19 Patch 2 with the 161-plugin MarinerX07 folder (Script Engine included) took ~70s to signal ready (measured 2026-07-27: spawn 07:14:53, ready.signal 07:16:03). The old 60s READY_TIMEOUT_MS cut off ~10s before ready. Worse, the launcher then dropped its tracked PID, so the automatic retry hit refuse-on-duplicate against the very instance that had just finished coming up -- a deadlock that needed a manual shutdown_codesys to clear. 150s covers the slow-plugin boot with headroom.
This commit is contained in:
parent
2161b492c6
commit
2158c9f725
2 changed files with 9 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "codesys-mcp-sp21-plus",
|
||||
"version": "0.15.1",
|
||||
"version": "0.15.2",
|
||||
"description": "Codesys-MCP-SP21+ -- fork of luke-harriman/Codesys-MCP carrying CODESYS V3.5 SP22 Patch 1 fixes (and forward-compat with later SPs): script-engine API drift, online/runtime tool auto-login, dual-SHA release classifier, set_pou_code omitted-decl wipe fix, add_library managed-overload, etc. MCP server for CODESYS with persistent UI instance and file-based IPC.",
|
||||
"main": "dist/server.js",
|
||||
"bin": {
|
||||
|
|
|
|||
|
|
@ -91,7 +91,14 @@ export function pathsEqual(a: string, b: string): boolean {
|
|||
s.toLowerCase().replace(/\\/g, '/').replace(/\/+$/, '').trim();
|
||||
return norm(a) === norm(b);
|
||||
}
|
||||
const READY_TIMEOUT_MS = 60_000;
|
||||
// A bare CODESYS install signals ready in ~15-25s. An install launched with
|
||||
// --additionalfolder that registers a large add-on set (e.g. SP19 P2 with the
|
||||
// 161-plugin MarinerX07 folder incl. the Script Engine) takes ~70s to boot --
|
||||
// measured 2026-07-27: spawned 07:14:53, ready.signal at 07:16:03. 60s cut it
|
||||
// off just before ready, then the refuse-on-duplicate guard blocked the retry
|
||||
// against the very instance that had just come up. 150s covers the slow-plugin
|
||||
// case with headroom without hanging a genuinely dead launch too long.
|
||||
const READY_TIMEOUT_MS = 150_000;
|
||||
const READY_POLL_MS = 500;
|
||||
const SHUTDOWN_WAIT_MS = 5_000;
|
||||
const HEALTH_CHECK_INTERVAL_MS = 5_000;
|
||||
|
|
|
|||
Loading…
Reference in a new issue