mirror of
https://github.com/immich-app/immich
synced 2026-08-15 13:03:57 +00:00
send() called response.write() but discarded its boolean return value. Every sync handler produces items via for-await loops over async DB cursors with no gating, so a client reading slower than the server can produce (a large AssetOcrV1 backfill over a slow mobile connection, per #29925) lets the response's internal write buffer grow unbounded — observed as either the V8 heap OOM'ing or the kernel OOM-killer taking down the api worker, and on constrained hosts taking other services with it. write() returns false once the stream's internal buffer exceeds its highWaterMark, signaling the producer should pause until 'drain' fires. send() now awaits that signal, and every call site awaits send() in turn, so a slow reader naturally throttles the DB cursor instead of the server continuing to buffer data the client hasn't caught up to yet. Refs #29925 |
||
|---|---|---|
| .. | ||
| bin | ||
| src | ||
| test | ||
| .gitignore | ||
| .npmignore | ||
| .prettierignore | ||
| .prettierrc | ||
| Dockerfile | ||
| Dockerfile.dev | ||
| eslint.config.mjs | ||
| helmet.json | ||
| mise.toml | ||
| nest-cli.json | ||
| package.json | ||
| tsconfig.build.json | ||
| tsconfig.json | ||