jmbannon / ytdl-sub

Lightweight tool to automate downloading and metadata generation with yt-dlp
https://ytdl-sub.readthedocs.io
GNU General Public License v3.0
1.84k stars 71 forks source link

[Bug] OSError: [Errno 24] Too many open files #685

Open stjep opened 1 year ago

stjep commented 1 year ago

Received a OSError: [Errno 24] Too many open files while running ytdl-sub and it asked that I provide the attached error file and YAML.

ytdl-sub.lyvwolnl.zip YAML.zip

jomonjohnn commented 1 year ago

Encountered the same with 2023.11.04+19eee28 on linux x64.

Traceback (most recent call last): File "ytdl_sub/subscriptions/subscription_download.py", line 123, in _prepare_working_directory File "ytdl_sub/subscriptions/subscription_download.py", line 173, in _subscription_download_context_managers File "ytdl_sub/subscriptions/subscription_download.py", line 297, in _process_subscription File "ytdl_sub/downloaders/url/downloader.py", line 490, in download File "ytdl_sub/downloaders/url/downloader.py", line 347, in _extract_entry_info_with_retry File "ytdl_sub/downloaders/ytdlp.py", line 95, in extract_info_with_retry File "ytdl_sub/downloaders/ytdlp.py", line 54, in extract_info File "contextlib.py", line 135, in enter File "ytdl_sub/downloaders/ytdlp.py", line 36, in ytdlp_downloader File "contextlib.py", line 135, in enter File "ytdl_sub/utils/logger.py", line 201, in handle_external_logs File "ytdl_sub/utils/logger.py", line 168, in _get File "ytdl_sub/utils/logger.py", line 151, in _get_debug_file_handler File "logging/init.py", line 1169, in init File "logging/init.py", line 1201, in _open OSError: [Errno 24] Too many open files: '/tmp/ytdl-sub.77htjdyr'

During handling of the above exception, another exception occurred:

jmbannon commented 1 year ago

which platform are you using to run ytdl-sub @jomonjohnn ?

jmbannon commented 1 year ago

It looks like the debug log (which writes to /tmp) can't write or something, then I'm guessing recursively keeps trying to log (and open another file in /tmp) until it hits this OSError