HaveAGitGat / Tdarr

Tdarr - Distributed transcode automation using FFmpeg/HandBrake + Audio/Video library analytics + video health checking (Windows, macOS, Linux & Docker)
2.72k stars 89 forks source link

windows server error 4066 EMFILE too many files open #962

Closed feltz916 closed 3 months ago

feltz916 commented 3 months ago

Describe the bug My server has been having problems doing most file operations. Copying files from my transcode cache, running mediainfo, etc. Getting the following errors:

[2024-02-06T21:23:51.349] [WARN] Tdarr_Server - FFprobe was unable to extract any data from this file: [2024-02-06T21:23:51.945] [ERROR] Tdarr_Server - { result: 'error', error: {} } [2024-02-06T21:23:52.222] [ERROR] Tdarr_Server - [Error: EMFILE: too many open files, open

[2024-02-06T21:25:20.844] [ERROR] Tdarr_Server - Error running MediaInfo 3 [2024-02-06T21:25:20.844] [ERROR] Tdarr_Server - EMFILE: too many open files, open

The thing that does not make sense, is that the transcodes are working correctly on the node client.

To Reproduce Its been this way for awhile now, and not sure when it started.

Expected behavior There should be no errors, and files should be copied.

Screenshots If applicable, add screenshots to help explain your problem.

Please provide the following information:

-Worker error [can be found on the 'Tdarr' tab by pressing the 'i' button on a failed item in the staged file section or in the transcode error section at the bottom]

Additional context Add any other context about the problem here.

feltz916 commented 3 months ago

ended up being a authentication problem with my NAS, while running the server as administrator :(

feltz916 commented 3 months ago

guess it wasn't related to auth, and its due to node.js and windows file io limits: https://github.com/nodejs/node/issues/44832

HaveAGitGat commented 3 months ago

Have you tried running the Docker container on Windows? Might solve your issue

feltz916 commented 3 months ago

yes i gave up on windows, and moved to a docker image.

HaveAGitGat commented 3 months ago

Ok thanks for the update, I haven't encountered this on Windows myself but can troubleshoot if needed in future by checking subprocesses in task manager on Windows and at what point the error occurs after starting up.