[Feature] Low-resource upload mode: automatically pause processing during uploads #31137
Closed
Tusker86
started this conversation in
Feature Request
Replies: 1 comment
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
The feature
Add an optional low-resource upload mode for small, HDD-backed, or CPU/RAM-constrained Immich servers.
When normal asset uploads are active, Immich should temporarily pause ordinary processing queues, then automatically resume them after a configurable idle delay. The intent is to stop upload writes from competing with thumbnails, metadata extraction, transcodes, OCR, face detection, and similar work on the same disk.
Suggested settings:
IMMICH UPLOAD: <user> — upload startedandupload finished.This must work with the normal web uploader and normal mobile backup, without a separate import tool or a manual pause/resume workflow.
Why this is useful
On small servers with HDD storage, a new upload can trigger multiple disk-heavy jobs immediately. Even if each job queue has low concurrency, several different queues can still run at once and compete with the upload. That makes ordinary browser uploads and phone backups slow or unreliable.
My proof-of-concept
I tested this by adding a server-side hook to Immich's normal asset-upload interceptor. It:
This worked for both browser uploads and mobile backups because both use the normal asset-upload endpoint. The browser may still show several files waiting, but only one request reaches the server upload handler at a time.
This is currently an unsupported, version-specific custom patch to compiled server code. A supported configuration would be safer, easier to maintain through upgrades, and useful for Raspberry Pi, NAS, USB-HDD, and other low-resource installations.
I found a related discussion about the web uploader defaulting to two concurrent uploads: #15307. This proposal is broader: it is a server-side, upload-aware mode that prevents background processing from competing with uploads.
Core implementation
This is the central JavaScript used in the server upload interceptor (imports and QueueService injection are required in the matching Immich version):
The complete version must retain Immich's normal Multer handler and use an RxJS
finalize()callback so the gate is released on both success and error. Do not pauseBackgroundTask: it contains maintenance work such as deletion and cleanup. This is a compiled-code patch, so it needs rechecking after every Immich update.All reactions