© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
ImmichI
Immich•10mo ago•
22 replies
Zoltrix

microservices worker exited with code 1

Hello, not sure what I've done. I've seen a few posts on Github and Discord that seem similar, but can't see any solutions that might assist to fix.

I've been running Immich for a few weeks without issue. It is currently running on verison v1.131.3

Today I restarted the Postgres container, didn't think much of it, and no idea if that caused the issue, but now the Immich server continually displays this in a loop:

Initializing Immich v1.131.3
Detected CPU Cores: 16
Starting api worker
Starting microservices worker
[Nest] 7  - 04/12/2025, 7:42:22 AM     LOG [Microservices:EventRepository] Initialized websocket server
microservices worker error: TypeError: Cannot read properties of undefined (reading 'replace'), stack: TypeError: Cannot read properties of undefined (reading 'replace')
    at queryError (/usr/src/app/node_modules/postgres/cjs/src/connection.js:389:48)
    at errored (/usr/src/app/node_modules/postgres/cjs/src/connection.js:384:17)
    at Socket.error (/usr/src/app/node_modules/postgres/cjs/src/connection.js:376:5)
    at Socket.emit (node:events:518:28)
    at emitErrorNT (node:internal/streams/destroy:170:8)
    at emitErrorCloseNT (node:internal/streams/destroy:129:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)
microservices worker exited with code 1
Killing api process
Initializing Immich v1.131.3
Detected CPU Cores: 16
Starting api worker
Starting microservices worker
[Nest] 7  - 04/12/2025, 7:42:22 AM     LOG [Microservices:EventRepository] Initialized websocket server
microservices worker error: TypeError: Cannot read properties of undefined (reading 'replace'), stack: TypeError: Cannot read properties of undefined (reading 'replace')
    at queryError (/usr/src/app/node_modules/postgres/cjs/src/connection.js:389:48)
    at errored (/usr/src/app/node_modules/postgres/cjs/src/connection.js:384:17)
    at Socket.error (/usr/src/app/node_modules/postgres/cjs/src/connection.js:376:5)
    at Socket.emit (node:events:518:28)
    at emitErrorNT (node:internal/streams/destroy:170:8)
    at emitErrorCloseNT (node:internal/streams/destroy:129:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)
microservices worker exited with code 1
Killing api process


I've now restarted the whole docker server just to rule that out. But still same issue.

The Postgres container logs say the following:

PostgreSQL Database directory appears to contain a database; Skipping initialization
2025-04-12 07:24:45.672 UTC [1] LOG:  redirecting log output to logging collector process
2025-04-12 07:24:45.672 UTC [1] HINT:  Future log output will appear in directory "log".
PostgreSQL Database directory appears to contain a database; Skipping initialization
2025-04-12 07:24:45.672 UTC [1] LOG:  redirecting log output to logging collector process
2025-04-12 07:24:45.672 UTC [1] HINT:  Future log output will appear in directory "log".
ImmichJoin
A place to hang out, get support, discuss Immich, get announcements about releases and anything else going on.
36,590Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Microservices exited with code 1
ImmichIImmich / help-desk-support
9mo ago
Unable to connect to the database. Retrying (1)... microservices worker exited with code 1
ImmichIImmich / help-desk-support
13mo ago
Transcoding issues - ffmpeg exited with code 1
ImmichIImmich / help-desk-support
3y ago
immich_server exited with code 139
ImmichIImmich / help-desk-support
7mo ago