Immich server hangs indefinitely when processing corrupt JPEG files
I have searched the existing issues, both open and closed, to make sure this is not a duplicate report.
- [ ] Yes
The bug
Environment:
- Immich version: v2.2.3
- Installation: Docker Compose
- OS: Ubuntu Server 24.04
- Storage: External library on NFS mount
Description:
Immich server becomes completely unresponsive when attempting to process corrupt JPEG files. The web interface hangs with "Server Offline - Unknown" status, and the application requires a full stack restart (including Redis cache clear) to recover.
Steps to Reproduce:
- Have corrupt JPEG files in external library path (files can be opened partially but have corrupted image data)
- Immich discovers and attempts to process these files during library scan
- Web interface becomes unresponsive
- Server shows "healthy" status but websocket connections fail immediately
- Browser console shows:
Uncaught (in promise) The message port closed before a response was received
Expected Behavior:
Immich should skip corrupt/unreadable files gracefully, log the error and continue processing other files.
Actual Behavior:
- Web interface becomes completely unresponsive
- No error logged in
docker logs immich_server - Websocket connections establish (101) but disconnect immediately
- API endpoints respond (200 OK) but frontend cannot load
- Regular
docker compose restartdoes NOT fix the issue - Only
docker compose down+docker compose up -d(full Redis cache clear) resolves it
Recovery Steps Taken:
- Identified corrupt files from error context
- Removed files from disk storage
- Removed asset entries from database:
DELETE FROM asset WHERE id IN (...) - Full stack shutdown and restart to clear Redis cache
- System recovered and functions normally
Additional Information:
- The corrupt JPEG files were also corrupt in backup storage, indicating corruption occurred before upload
- I can provide the corrupt JPEG files to developers upon request (prefer not to attach publicly)
Impact:
High - Complete service outage requiring manual database intervention and full restart
The OS that Immich Server is running on
Ubuntu Server 24.04
Version of Immich Server
v2.2.3
Version of Immich Mobile App
N/A
Platform with the issue
- [ ] Server
- [ ] Web
- [ ] Mobile
Device make and model
No response
Your docker-compose.yml content
N/A
Your .env content
N/A
Reproduction steps
...
Relevant log output
Additional information
No response
This issue has automatically been closed as it is likely a duplicate. We get a lot of duplicate threads each day, which is why we ask you in the template to confirm that you searched for duplicates before opening one. If you're sure this is not a duplicate, please leave a comment and we will reopen the thread if necessary.
I suggest that this issue be reopened. This is a distinct bug that differs significantly from other corrupt file issues.
Why this is a unique bug:
Unlike similar issues where corrupt files produce ERROR logs during thumbnail generation (#8510, #10507, #7128), this bug causes:
- Silent system failure - Zero error messages in logs while system becomes completely unresponsive
- Complete service outage - Web interface shows "Server Offline - Unknown", websockets fail, system appears healthy but is unusable
- Requires full shutdown -
docker compose restartdoes NOT resolve it; onlydocker compose down+up -dworks
This is not a duplicate of existing issues - those bugs log errors and fail gracefully. This bug silently hangs the entire system requiring manual intervention.
I have the corrupt JPEG files saved and can provide them for reproduction. I have also enabled LOG_LEVEL=verbose for additional debugging if this occurs again.
Please reopen this issue.
Hello, can you help share a zipped corrupted file so it can be used for testing?
Hmm hold on, you are on v2.2.3 so the freeze issue is coming from the popped up notification. Can you help updating to the latest version?
Your compose and env content is applicable to this issue, please attach them as requested.
Hi! Here are the requested files:
Environment:
- Immich version: v2.2.3 (upgraded to v2.3.1 after the bug occurred)
- Deployment: Docker Compose
- External library: ~500k photos on Synology NAS via NFS (read-only)
Files attached:
- docker-compose.yml (sanitized)
- Relevant .env settings (passwords removed)
- ZIP with the three corrupted files
Additional context:
- Verbose logging is enabled (LOG_LEVEL=verbose)
- The bug caused complete system unresponsiveness with NO error messages in logs
- Only
docker compose down + up(full Redis cache clear) resolved it - After removing the corrupt files from disk AND database, system works normally
Now I'm wondering if somehow corrupt files in my asset library are causing me issues. I see Brave desktop browser crashes all the time when scrolling through my library. Especially when selecting 20-100 items to add to an album. I see no obvious errors either.