AssetExtractMetadata: asset_exif.rating overflows integer column (derived value, not corrupted input) - duration × 9,000,000 for one pattern
I have searched the existing issues, both open and closed, to make sure this is not a duplicate report.
- Yes
The bug
AssetExtractMetadata repeatedly fails and never recovers for a small number of video assets, with:
PostgresError: value "91680300000" is out of range for type integerThis is the same recurring bug class as #23218, #18717, #30913 ("asset_video.bitrate is integer"), #30217 ("duration stored as nanoseconds") and #31515 ("derived duration exceeds the 32-bit asset.duration column") — an oversized value being written into a 4-byte integer column. Those were all fixed for their respective columns (asset_video.bitrate, asset.duration). This instance is asset_exif.rating, which does not appear to have the same guard.
What's different from most of the earlier reports (e.g. #23218, which turned out to be a genuinely corrupted/absurd EXIF ISO value in the source file): for at least two of the three assets I was able to inspect, the source file has no rating-like tag anywhere in its metadata at all. ffprobe -show_format -show_streams on the file shows nothing resembling a rating. So this doesn't look like "reject garbage input" — it looks like the value is being derived/computed internally and then overflowing on write.
Concretely, for two videos downloaded via a third-party tool (TAG:handler_name=Twitter-vork muxer, both with unusually long durations for that source), the overflowing value is exactly duration_seconds × 9,000,000:
| Asset | ffprobe duration (s) |
Error value | duration × 9,000,000 |
|---|---|---|---|
| A | 10186.700000 | 91680300000 | 91,680,300,000 (exact) |
| B | 5932.970667 | ~53396400000 | 53,396,736,000 (matches to within float rounding) |
That multiplier overflows a signed 32-bit integer for any video longer than ~4 minutes (2^31 / 9,000,000 ≈ 238s), so this will keep recurring for any sufficiently long upload, independent of file health.
A third affected asset does not fit this pattern at all: a normal ~2-minute phone-recorded video (standard VideoHandle/SoundHandle tags, nothing exotic) with duration 121.171438s, which still produces an out-of-range error (19671286395) that isn't duration × 9,000,000 or any other simple multiple of duration I could find. So there may be two separate code paths hitting the same underlying "unbounded value → integer column" problem, not one.
Once an asset hits this, AssetExtractMetadata fails and is retried indefinitely (I saw repeated identical failures over several days across upload, sidecar-write, and other job triggers), with no backoff and no way for the asset to reach a terminal/skipped state. The caption/description write itself (via PATCH /assets/:id, done by a third-party captioning tool against the API) succeeds fine and produces a valid .xmp sidecar — it's specifically metadata extraction that's stuck in a permanent retry loop.
The OS that Immich Server is running on
Ubuntu 24.04.5 LTS
Version of Immich Server
v3.2.2
Version of Immich Mobile App
N/A — this instance isn't used with the mobile app, server/API only
Platform with the issue
- Server
Your docker-compose.yml content
name: immich
services:
immich-server:
container_name: immich_server
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
extends:
file: hwaccel.transcoding.yml
service: nvenc
volumes:
- ${UPLOAD_LOCATION}:/data
- /etc/localtime:/etc/localtime:ro
env_file:
- .env
ports:
- '2283:2283'
depends_on:
- redis
- database
restart: always
healthcheck:
disable: false
immich-machine-learning:
container_name: immich_machine_learning
image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
volumes:
- model-cache:/cache
env_file:
- .env
restart: always
healthcheck:
disable: false
redis:
container_name: immich_redis
image: docker.io/valkey/valkey:9@sha256:546304417feac0874c3dd576e0952c6bb8f06bb4093ea0c9ca303c73cf458f63
healthcheck:
test: redis-cli ping || exit 1
restart: always
database:
container_name: immich_postgres
image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: ${DB_DATABASE_NAME}
POSTGRES_INITDB_ARGS: '--data-checksums'
volumes:
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
shm_size: 128mb
restart: always
healthcheck:
disable: false
volumes:
model-cache:Your .env content
UPLOAD_LOCATION=/mnt/nvme/immich/library
DB_DATA_LOCATION=/mnt/nvme/immich/postgres
TZ=America/Los_Angeles
IMMICH_VERSION=release
DB_PASSWORD=REDACTED
DB_USERNAME=postgres
DB_DATABASE_NAME=immichReproduction steps
- Upload (or have an external library scan pick up) a video file that is either (a) longer than roughly 4 minutes and was produced/re-muxed by a non-standard tool, or (b) triggers whatever the second, unidentified code path is (a plain ~2-minute phone video was enough in my case).
- Let
AssetExtractMetadatarun. - The job fails with
PostgresError: value "<huge number>" is out of range for type integerand is retried indefinitely on every subsequent trigger (new upload scan, sidecar write, manual "Extract Metadata" job, etc.) without ever reaching a terminal state.
Relevant log output
[Nest] 56 - 09/27/2026, 4:09:22 PM ERROR [Microservices:{"id":"<redacted-uuid>","source":"upload"}] Unable to run job handler (AssetExtractMetadata): PostgresError: value "91680300000" is out of range for type integer
PostgresError: value "91680300000" is out of range for type integer
at ErrorResponse (/usr/src/app/server/node_modules/.pnpm/[email protected]/node_modules/postgres/cjs/src/connection.js:794:26)
at handle (/usr/src/app/server/node_modules/.pnpm/[email protected]/node_modules/postgres/cjs/src/connection.js:480:6)
at Socket.data (/usr/src/app/server/node_modules/.pnpm/[email protected]/node_modules/postgres/cjs/src/connection.js:315:9)
Query failed : {
durationMs: 2.575806997716427,
error: PostgresError: value "91680300000" is out of range for type integer\d asset_exif confirms the column in question:
rating | integer | |Repeated identically (same asset, same error) across source: "upload" and source: "sidecar-write" job triggers over several days.
Additional information
asset_exif.ratingisinteger. Given the demonstrated exactduration × 9,000,000relationship for two independent assets, and that neither source file has any embedded rating-like tag, this looks like a derived/computed value overflowing on write rather than a corrupted-input problem — different in kind from e.g. #23218's corruptedISOtag.- Whatever the correct fix for the two distinct code paths turns out to be, it might be worth the more general fix other issues in this cluster have asked for: validate/clamp before insert (or widen the column to
bigint, as apparently already done forasset_video.bitrate/asset.duration) so a single asset with a wild value can't leave metadata extraction permanently stuck, rather than fixing this reactively one column at a time. - Happy to provide the affected files or more
ffprobe/exiftooloutput if useful — didn't attach them here since I wasn't sure of this repo's policy on binary attachments for this kind of report.
Source: immich-app/immich