immich/server
enol5423 55b673093c fix(server): respect backpressure in the sync stream
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
2026-08-14 18:48:30 +06:00
..
bin fix(server): memory fragmentation (#27027) 2026-03-26 18:21:52 +01:00
src fix(server): respect backpressure in the sync stream 2026-08-14 18:48:30 +06:00
test fix: owner cascade delete album (#30692) 2026-08-11 23:05:18 +02:00
.gitignore
.npmignore chore: use pnpm for builds (#19752) 2025-08-19 08:55:24 -04:00
.prettierignore refactor: migrate map repository to kysely (#15348) 2025-01-17 09:14:42 -06:00
.prettierrc
Dockerfile chore(deps): update ghcr.io/jdx/mise docker tag to v2026.8.3 (#30699) 2026-08-11 12:21:04 +02:00
Dockerfile.dev chore(deps): update ghcr.io/jdx/mise docker tag to v2026.8.3 (#30699) 2026-08-11 12:21:04 +02:00
eslint.config.mjs chore: use import.meta.dirname instead of __dirname (#30738) 2026-08-12 18:01:30 +02:00
helmet.json fix(server): updated default CSP config to support videos from V3 player (#29830) 2026-07-15 12:49:18 +02:00
mise.toml refactor: plugin sdk types (#28674) 2026-05-28 22:04:15 +00:00
nest-cli.json fix: isolate docker host/container filesystem for node_modules and build output (#21167) 2025-08-24 13:09:45 -05:00
package.json fix(deps): update dependency js-yaml to v5 [security] (#30440) 2026-07-31 13:24:39 +02:00
tsconfig.build.json chore: move .tsbuildinfo file to dist folder (#27682) 2026-04-10 16:02:25 +02:00
tsconfig.json chore(deps): update dependency eslint-plugin-unicorn to v70 - abandoned (#29684) 2026-07-20 23:47:14 -04:00