I can reproduce this too. As reported by everyone else, it happens when a burst of request come.
Whenever i browse my immich photo library, it sends a lot of request in a very short time, which crashes the backend with the following log
2025/09/20 03:46:53 [WebSocket] Client 20250920-034511-127.0.0.1:11398 sent 100 messages
2025/09/20 03:46:55 [WebSocket] Client 20250920-034511-127.0.0.1:11398 sent 200 messages
2025/09/20 03:46:57 [WebSocket] Client 20250920-034511-127.0.0.1:11398 sent 400 messages
2025/09/20 03:46:58 [WebSocket] Client 20250920-034511-127.0.0.1:11398 sent 500 messages
2025/09/20 03:46:58 [WebSocket] Client 20250920-034511-127.0.0.1:11398 sent 600 messages
fatal error: concurrent map iteration and map write
goroutine 36 [running]:
reflect.mapiterinit(0x454be9?, 0x50?, 0xce50c0?)
/usr/local/go/src/runtime/map.go:1392 +0x13
reflect.(*MapIter).Next(0xc9bec0?)
/usr/local/go/src/reflect/value.go:2000 +0x57
encoding/json.mapEncoder.encode({0xffffffffffffffff?}, 0xc0001b7dc0, {0xc9bec0?, 0xc0003523e0?, 0x2?}, {0xa?, 0x0?})
/usr/local/go/src/encoding/json/encode.go:745 +0x334
encoding/json.structEncoder.encode({{{0xc000370008, 0x18, 0x23}, 0xc0002fe7b0, 0xc0002fe7e0}}, 0xc0001b7dc0, {0xd89d80?, 0xc0003523c0?, 0xc0001b7db0?}, {0x0, ...})
/usr/local/go/src/encoding/json/encode.go:704 +0x21e
encoding/json.ptrEncoder.encode({0xc0001b7db0?}, 0xc0001b7dc0, {0xc407e0?, 0xc0001b7db0?, 0xc0001b7db0?}, {0x8?, 0x0?})
/usr/local/go/src/encoding/json/encode.go:876 +0x23c
encoding/json.structEncoder.encode({{{0xc0000da008, 0x4, 0x4}, 0xc0002fe870, 0xc0002fe8a0}}, 0xc0001b7dc0, {0xd25900?, 0xc0001b7d80?, 0x411b1b?}, {0x0, ...})
/usr/local/go/src/encoding/json/encode.go:704 +0x21e
encoding/json.(*encodeState).reflectValue(0xc0001b7dc0, {0xd25900?, 0xc0001b7d80?, 0x411ec5?}, {0x38?, 0x0?})
/usr/local/go/src/encoding/json/encode.go:321 +0x73
encoding/json.(*encodeState).marshal(0x411b1b?, {0xd25900?, 0xc0001b7d80?}, {0x71?, 0x0?})
/usr/local/go/src/encoding/json/encode.go:297 +0xc5
encoding/json.Marshal({0xd25900, 0xc0001b7d80})
/usr/local/go/src/encoding/json/encode.go:163 +0xd0
main.(*WebSocketClient).sendMessage(0xc0002c01c0, {{0xda70f9, 0x6}, {0xd9a220, 0xc0000fd188}, {0x0, 0x0}, 0xc0003523c0})
/app/websocket.go:290 +0x10c
main.(*WebSocketClient).sendNewLogWithStats(_, {{0xc0004ad998, 0x18}, {0xc0003e3e80, 0x19}, {0xc00042a9d0, 0xc}, {0xc00042abb8, 0x3}, {0xc0004518b0, ...}, ...})
/app/websocket.go:359 +0x32a
main.(*WebSocketClient).WritePump(0xc0002c01c0)
/app/websocket.go:193 +0x745
main.(*WebSocketClient).Start.func1()
/app/websocket.go:57 +0x49
created by main.(*WebSocketClient).Start in goroutine 49
/app/websocket.go:49 +0x56
goroutine 1 [chan receive, 1 minutes]:
main.main()
/app/main.go:169 +0x1398
goroutine 6 [select, 1 minutes]:
github.com/patrickmn/go-cache.(*janitor).Run(0xc0003468f0, 0xc0003d0580) …