I
Immich3mo ago
skernt

Single file appears to get stuck and blow up CPU utilization

Set up immich today via docker compose, all works except the nvenc transcoding but I can figure that out. I was 3k photos/videos uploaded from my ipad when I decided to check how my server was from a CPU usage standpoint, I saw my CPU pegged nearly 100% across all cores. So I opened the immich server logs and while I saw a constant and continued stream of logs like [Nest] 7 - 06/27/2025, 12:20:34 AM LOG [Microservices:MediaService] Transcoding video 5ffc3f1f-bb5b-44d7-8e22-d2a049cc22d1 without hardware acceleration [Nest] 7 - 06/27/2025, 12:20:35 AM LOG [Microservices:MediaService] Successfully encoded 5ffc3f1f-bb5b-44d7-8e22-d2a049cc22d1
22 Replies
Immich
Immich3mo ago
:wave: Hey @skernt, Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich :immich:. References - Container Logs: docker compose logs docs - Container Status: docker ps -a docs - Reverse Proxy: https://immich.app/docs/administration/reverse-proxy - Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA Checklist I have... 1. :blue_square: verified I'm on the latest release(note that mobile app releases may take some time). 2. :blue_square: read applicable release notes. 3. :blue_square: reviewed the FAQs for known issues. 4. :blue_square: reviewed Github for known issues. 5. :blue_square: tried accessing Immich via local ip (without a custom reverse proxy). 6. :blue_square: uploaded the relevant information (see below). 7. :blue_square: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable (an item can be marked as "complete" by reacting with the appropriate number) Information In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider: - Your docker-compose.yml and .env files. - Logs from all the containers and their status (see above). - All the troubleshooting steps you've tried so far. - Any recent changes you've made to Immich or your system. - Details about your system (both software/OS and hardware). - Details about your storage (filesystems, type of disks, output of commands like fdisk -l and df -h). - The version of the Immich server, mobile app, and other relevant pieces. - Any other information that you think might be relevant. Please paste files and logs with proper code formatting, and especially avoid blurry screenshots. Without the right information we can't work out what the problem is. Help us help you ;) If this ticket can be closed you can use the /close command, and re-open it later if needed.
skernt
skerntOP3mo ago
skernt
skerntOP3mo ago
Sorry, submitted a little early. The logs above show the section that matches with my process list of what's eating up most of the resources
skernt
skerntOP3mo ago
No description
Mraedis
Mraedis3mo ago
Yeah that's the transcoding, nothing to worry about unless your server isn't cooled properly This also is only really an issue with large batch uploads
skernt
skerntOP3mo ago
If you look at the error log though there is some database error though. It shouldn’t be spiked for 2 hours on the exact same file. The error being error: PostgresError: duplicate key value violates unique constraint "UQ_assets_owner_checksum" And the checksum it mentions is the one that you see in my list of processes a hundred times over If the non-unique checksum or whatever that error means can be fixed by figuring out my transcoding issue, I’d like to switch to that. I have it configured to use the dedicated rtx 4090 in my immich server but it’s not seeming to pick it up. It’s using it properly for the machine learning components without issue and is incredibly quick. Here is my compose configuration as well as my transcoding file
services:
immich-server:
container_name: immich_server
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
user: '1000'
extends:
file: hwaccel.transcoding.yml
service: nvenc # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
volumes:
# Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- /etc/localtime:/etc/localtime:ro
env_file:
- .env
ports:
- '2283:2283'
depends_on:
- redis
- database
restart: always
healthcheck:
disable: false
networks:
- internal
- external
services:
immich-server:
container_name: immich_server
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
user: '1000'
extends:
file: hwaccel.transcoding.yml
service: nvenc # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
volumes:
# Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- /etc/localtime:/etc/localtime:ro
env_file:
- .env
ports:
- '2283:2283'
depends_on:
- redis
- database
restart: always
healthcheck:
disable: false
networks:
- internal
- external
Taking a screenshot of both instead
skernt
skerntOP3mo ago
No description
skernt
skerntOP3mo ago
No description
Mraedis
Mraedis3mo ago
Is the stuck video perhaps a very long one?
skernt
skerntOP3mo ago
There is an error the an insert into the database but I’m unable to see that it’s stuck on a file other than the process list which doesn’t give me any specific file that I can tell at this time.. It also didn’t stop on that file, I could see in the iPad app that other files were going constantly.
skernt
skerntOP3mo ago
No description
skernt
skerntOP3mo ago
Right now with the service started, I launch the app and no backup/upload process is occurring but the logs server side immediately fill with the error.
skernt
skerntOP3mo ago
No description
Mraedis
Mraedis3mo ago
Those are different files though Is it not just assets you already have?
skernt
skerntOP3mo ago
with identical checksums? Wouldn't it just fail in the UI as a duplicate and move on? what's the best way in immich to chase down the file that shows as "already exists" and remove it? Maxing the i9 ultra 285k and an rtx 4090 for going on an hour now for a single random checksum duplication seems wild. Is there a way to manually address this? I only have about 1000 more assets it's ripping through so i'm going to let it complete and will see where that's at
Mraedis
Mraedis3mo ago
It shows the path in the error log right there, just check the source and destination, if destination exist then check whether the file is valid
skernt
skerntOP3mo ago
Am I safe to just go in and delete that file? I see that file in numerous locations as well, /encoded-video, /uploads
Mraedis
Mraedis3mo ago
I can't say that without inspecting both files 👀 you should be safe but no guarantees
skernt
skerntOP3mo ago
So I deleted everything, rebuild the compose files, the hwaccel files, and the .env. Completely fresh following directly what is on the immich website. Things are going through much better so hopefully I don't hit any of this issues this time. The question I do have, what should I be looking for as to why my gpu/nvenc trancoding isn't working? The machine learning works, i've copied both the machine learning .yml as well as the transcoding yml from immich. I've compared it against a dozen other youtube video or blog setups and can't see a different for using an nvidia gpu. My drivers are the latests, docker uses my gpu for machine learning as well as doing the nvidia-smi test without a problem. Just trying to understand why things are transcoding within hardware acceleration.
Mraedis
Mraedis3mo ago
Did you enable hardware acceleration in the gui settings?
skernt
skerntOP3mo ago
I did not! Do I have to restart immich?
Mraedis
Mraedis3mo ago
No but I think running jobs will not use them, newly queued ones might. I'm not sure 👀

Did you find this page helpful?