Fix zombie wget processes #66
This commit is contained in:
+1
-1
@@ -8,7 +8,7 @@
|
||||
"build:client": "tsc -p tsconfig.client.json",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
"test:container": "podman build --build-arg PACKAGE_VERSION=$(npm pkg get version | xargs) --format docker -t immich-proxy-test .. && podman run --init -it -p=3000:3000 --env-file .env --restart=always immich-proxy-test",
|
||||
"test:container": "podman build --build-arg PACKAGE_VERSION=$(npm pkg get version | xargs) --format docker -t immich-proxy-test .. && podman run -it -p=3000:3000 --env-file .env --restart=always immich-proxy-test",
|
||||
"start": "node dist/index.js"
|
||||
},
|
||||
"author": "Alan Grainger",
|
||||
|
||||
+6
-1
@@ -622,9 +622,14 @@ export function isKey (key: string) {
|
||||
|
||||
/**
|
||||
* Reachability ping for the `/share/healthcheck` route.
|
||||
*
|
||||
* Capped at 3 s so a slow Immich fails the healthcheck instead of hanging it.
|
||||
* The compose healthcheck gives curl 4 s inside Docker's 5 s timeout; a check
|
||||
* that overruns gets killed and leaves a zombie curl behind (GitHub #66).
|
||||
*/
|
||||
export async function accessible () {
|
||||
return !!(await request('/server/ping'))
|
||||
// The catch covers a timeout during the body read, which request() does not
|
||||
return !!(await request('/server/ping', { signal: AbortSignal.timeout(3000) }).catch(() => null))
|
||||
}
|
||||
|
||||
// Minimum Immich server version IPP is compatible with
|
||||
|
||||
Reference in New Issue
Block a user