invidious
invidious copied to clipboard
Openssl: too many open files
After having 1499ce43bf1cd6a47e8c1b0df4c915feb7ca8fb4 running for a while ( seems to happen after at least 5+hours running ), instance starts taking 1 core cpu and hang.
Extract of the logs (repeating forever, the ID is changing of course):
UCn8zNIfYAQNdrFRrr8oibKw : SSL_connect: error:02000018:system library:OPENSSL_internal:Too many open files UC4oo36VSTk5fH6YJSICEDMA : getaddrinfo: System error
Was compiled on a debian 10:
crystal build src/invidious.cr
Crystal 0.31.1 [0e2e1d067] (2019-09-30) LLVM: 8.0.0 Default target: x86_64-unknown-linux-gnu
it does not happen using lsquic 0.1.3 and 276bf09238103aaabe64be09b9ac10f976510ff7
After having 1499ce4 running for a while ( seems to happen after at least 5+hours running ), instance starts taking 1 core cpu and hang.
Extract of the logs (repeating forever, the ID is changing of course):
UCn8zNIfYAQNdrFRrr8oibKw : SSL_connect: error:02000018:system library:OPENSSL_internal:Too many open files UC4oo36VSTk5fH6YJSICEDMA : getaddrinfo: System error
Was compiled on a debian 10:
crystal build src/invidious.crCrystal 0.31.1 [0e2e1d067] (2019-09-30) LLVM: 8.0.0 Default target: x86_64-unknown-linux-gnu
Happen to me too. Server running on Debian 9.
I can clearly confirm the fd leak after some time and videos viewing on 88a538e71bd9810a8b47524b2ddc865ec6326285:
#After 4h running: ~/invidious$ lsof | grep invidious | wc -l 2684 ~/invidious$ sudo service invidious restart ~/invidious$ lsof | grep invidious | wc -l 230
How is your invidious running 4 hours? Mine is crashing after at least 5 minutes
On December 7, 2019 1:44:21 AM UTC, "Tristan Mahé" [email protected] wrote:
I can clearly confirm the fd leak after some time and videos viewing:
#After 4h running: ~/invidious$ lsof | grep invidious | wc -l 2684 ~/invidious$ sudo service invidious restart ~/invidious$ lsof | grep invidious | wc -l 230
-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/omarroth/invidious/issues/948#issuecomment-562801680
i just compiled and run it ?
Maybe you have a lot of subs to refresh and this fd leaks comes from there ? Although I don't see crashes with that fd leak. Just invidious hanging and using 100%cpu once it happens. A restart solves the issue.
I have not been able to pinpoint where this fd leak comes from yet.
seems fixed in latest master.
my bad, just saw that I raised the limit. Errors I am getting now on 588fc6df85e4bdcd1caff3c3d544a55a234362ee:
accept: Too many open files (Errno) from /usr/share/crystal/src/thread.cr:119:5 in 'accept?' from /usr/share/crystal/src/http/server.cr:454:13 in '->' from /usr/share/crystal/src/fiber.cr:255:3 in 'run' from ???
Same here. Crashes after a while
accept: Too many open files (Errno)
from /usr/share/crystal/src/crystal/system/unix/pthread.cr:113:5 in 'accept?'
from /usr/share/crystal/src/http/server.cr:454:13 in '->'
from /usr/share/crystal/src/fiber.cr:255:3 in 'run'
from ???
Fd leak?
Is there a fix for this? I have the problem, it makes the instance crash and this error is thrown so much that the logs are filling the disk space entirely very quickly.
Increase the amount of files allowed to being opened at one time with ulimit.
invidious@invidious:~$ ulimit
unlimited
I have this issue as well even though my ulimit shows unlimited.
https://github.com/iv-org/invidious/issues/578 is being closed with no solution.
Has anyone been able to work around this?
crontab -e to restart the server every 2 hours should do the job.
0 */2 * * * systemctl restart invidious
Pretty dirty yet betting than not serving the user at all…
I have this issue as well even though my ulimit shows unlimited.
You have to add * soft nofile unlimited to /etc/security/limits.conf to make this actually effective.
crontab -e to restart the server every 2 hours should do the job.
That's what I did originally but pretty annoying if it restarts when you're watching (and not really pretty either). I have a cronjob running a script every minutes. The scripts checks systemctl status invidious for "Too many open files", if the string is present then I restart invidious. Mine restarts between 1 and 4 times a day with this.
That's a more appropriate initiative @rderensy! Would you mind sharing that script eventually?
If any are interested in testing out a change coming down the line, you might check out this PR https://github.com/iv-org/lsquic.cr/pull/2
I included a comment with how to include the fix into your invidious project. If you do, let us know how it works for you.
Oh wow, thanks for notifying! I've removed the cron and tuned shard file to use that fork; then recompiled.
For now it's running on https://tube.connect.cafe, we'll see in a few hours. 🕙
You have to add * soft nofile unlimited to /etc/security/limits.conf to make this actually effective.
*Persistent across reboots
This issue has been automatically marked as stale and will be closed in 30 days because it has not had recent activity and is much likely outdated. If you think this issue is still relevant and applicable, you just have to post a comment and it will be unmarked.
Bump
Bump
Can you tell us if you can still reproduce this issue.
Same issue here.
-- Logs begin at Wed 2022-06-29 11:06:34 CEST, end at Wed 2022-06-29 11:21:30 CEST. --
Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/io/evented.cr:131:7 in 'accept?'
Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/http/server.cr:459:13 in '->'
Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/fiber.cr:146:11 in 'run'
Jun 29 11:21:06 invidious[2873]: from ???
Jun 29 11:21:06 invidious[2873]: 2022-06-29T09:21:04.812383Z ERROR - http.server: Error while connecting a new socket
Jun 29 11:21:06 invidious[2873]: accept: Too many open files (Socket::Error)
Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/io/evented.cr:131:7 in 'accept?'
Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/http/server.cr:459:13 in '->'
Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/fiber.cr:146:11 in 'run'
Jun 29 11:21:06 invidious[2873]: from ???
Jun 29 11:21:06 invidious[2873]: 2022-06-29T09:21:04.812406Z ERROR - http.server: Error while connecting a new socket
Jun 29 11:21:06 invidious[2873]: accept: Too many open files (Socket::Error)
Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/io/evented.cr:131:7 in 'accept?'
Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/http/server.cr:459:13 in '->'
Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/fiber.cr:146:11 in 'run'
Jun 29 11:21:06 invidious[2873]: from ???
Jun 29 11:21:06 invidious[2873]: 2022-06-29T09:21:04.812427Z ERROR - http.server: Error while connecting a new socket
Jun 29 11:21:06 invidious[2873]: accept: Too many open files (Socket::Error)
Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/io/evented.cr:131:7 in 'accept?'
Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/http/server.cr:459:13 in '->'
Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/fiber.cr:146:11 in 'run'
Jun 29 11:21:06 invidious[2873]: from ???
Jun 29 11:21:06 invidious[2873]: 2022-06-29T09:21:04.812449Z ERROR - http.server: Error while connecting a new socket
Jun 29 11:21:06 invidious[2873]: accept: Too many open files (Socket::Error)
Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/io/evented.cr:131:7 in 'accept?'
Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/http/server.cr:459:13 in '->'
Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/fiber.cr:146:11 in 'run'
Jun 29 11:21:06 invidious[2873]: from ???
Jun 29 11:21:06 invidious[2873]: 2022-06-29T09:21:04.812465Z ERROR - http.server: Error while connecting a new socket
Jun 29 11:21:06 invidious[2873]: accept: Too many open files (Socket::Error)
Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/io/evented.cr:131:7 in 'accept?'
Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/http/server.cr:459:13 in '->'
Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/fiber.cr:146:11 in 'run'
Jun 29 11:21:06 invidious[2873]: from ???
Jun 29 11:21:06 invidious[2873]: 2022-06-29T09:21:04.812482Z ERROR - http.server: Error while connecting a new socket
Jun 29 11:21:06 invidious[2873]: accept: Too many open files (Socket::Error)
Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/io/evented.cr:131:7 in 'accept?'
Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/http/server.cr:459:13 in '->'
Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/fiber.cr:146:11 in 'run'
Jun 29 11:21:06 invidious[2873]: from ???
Jun 29 11:21:06 invidious[2873]: 2022-06-29T09:21:04.812498Z ERROR - http.server: Error while connecting a new socket
Jun 29 11:21:06 invidious[2873]: accept: Too many open files (Socket::Error)
Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/io/evented.cr:131:7 in 'accept?'
Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/http/server.cr:459:13 in '->'
Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/fiber.cr:146:11 in 'run'
Jun 29 11:21:06 invidious[2873]: from ???
Jun 29 11:21:06 invidious[2873]: 2022-06-29T09:21:04.812515Z ERROR - http.server: Error while connecting a new socket
Jun 29 11:21:06 invidious[2873]: accept: Too many open files (Socket::Error)
Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/io/evented.cr:131:7 in 'accept?'
Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/http/server.cr:459:13 in '->'
Same issue here.
-- Logs begin at Wed 2022-06-29 11:06:34 CEST, end at Wed 2022-06-29 11:21:30 CEST. -- Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/io/evented.cr:131:7 in 'accept?' Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/http/server.cr:459:13 in '->' Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/fiber.cr:146:11 in 'run' Jun 29 11:21:06 invidious[2873]: from ??? Jun 29 11:21:06 invidious[2873]: 2022-06-29T09:21:04.812383Z ERROR - http.server: Error while connecting a new socket Jun 29 11:21:06 invidious[2873]: accept: Too many open files (Socket::Error) Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/io/evented.cr:131:7 in 'accept?' Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/http/server.cr:459:13 in '->' Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/fiber.cr:146:11 in 'run' Jun 29 11:21:06 invidious[2873]: from ??? Jun 29 11:21:06 invidious[2873]: 2022-06-29T09:21:04.812406Z ERROR - http.server: Error while connecting a new socket Jun 29 11:21:06 invidious[2873]: accept: Too many open files (Socket::Error) Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/io/evented.cr:131:7 in 'accept?' Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/http/server.cr:459:13 in '->' Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/fiber.cr:146:11 in 'run' Jun 29 11:21:06 invidious[2873]: from ??? Jun 29 11:21:06 invidious[2873]: 2022-06-29T09:21:04.812427Z ERROR - http.server: Error while connecting a new socket Jun 29 11:21:06 invidious[2873]: accept: Too many open files (Socket::Error) Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/io/evented.cr:131:7 in 'accept?' Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/http/server.cr:459:13 in '->' Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/fiber.cr:146:11 in 'run' Jun 29 11:21:06 invidious[2873]: from ??? Jun 29 11:21:06 invidious[2873]: 2022-06-29T09:21:04.812449Z ERROR - http.server: Error while connecting a new socket Jun 29 11:21:06 invidious[2873]: accept: Too many open files (Socket::Error) Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/io/evented.cr:131:7 in 'accept?' Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/http/server.cr:459:13 in '->' Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/fiber.cr:146:11 in 'run' Jun 29 11:21:06 invidious[2873]: from ??? Jun 29 11:21:06 invidious[2873]: 2022-06-29T09:21:04.812465Z ERROR - http.server: Error while connecting a new socket Jun 29 11:21:06 invidious[2873]: accept: Too many open files (Socket::Error) Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/io/evented.cr:131:7 in 'accept?' Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/http/server.cr:459:13 in '->' Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/fiber.cr:146:11 in 'run' Jun 29 11:21:06 invidious[2873]: from ??? Jun 29 11:21:06 invidious[2873]: 2022-06-29T09:21:04.812482Z ERROR - http.server: Error while connecting a new socket Jun 29 11:21:06 invidious[2873]: accept: Too many open files (Socket::Error) Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/io/evented.cr:131:7 in 'accept?' Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/http/server.cr:459:13 in '->' Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/fiber.cr:146:11 in 'run' Jun 29 11:21:06 invidious[2873]: from ??? Jun 29 11:21:06 invidious[2873]: 2022-06-29T09:21:04.812498Z ERROR - http.server: Error while connecting a new socket Jun 29 11:21:06 invidious[2873]: accept: Too many open files (Socket::Error) Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/io/evented.cr:131:7 in 'accept?' Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/http/server.cr:459:13 in '->' Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/fiber.cr:146:11 in 'run' Jun 29 11:21:06 invidious[2873]: from ??? Jun 29 11:21:06 invidious[2873]: 2022-06-29T09:21:04.812515Z ERROR - http.server: Error while connecting a new socket Jun 29 11:21:06 invidious[2873]: accept: Too many open files (Socket::Error) Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/io/evented.cr:131:7 in 'accept?' Jun 29 11:21:06 invidious[2873]: from /usr/share/crystal/src/http/server.cr:459:13 in '->'
Please paste your config.yml without the credentials.
Sure:
config.yml
#########################################
#
# Database configuration
#
#########################################
##
## Database configuration with separate parameters.
## This setting is MANDATORY, unless 'database_url' is used.
##
##
## Database configuration using a single URI. This is an
## alternative to the 'db' parameter above. If both forms
## are used, then only database_url is used.
## This setting is MANDATORY, unless 'db' is used.
##
## Note: The 'database_url' setting allows the use of UNIX
## sockets. To do so, remove the IP address (or FQDN) and port
## and append the 'host' parameter. E.g:
## postgres://kemal:kemal@/invidious?host=/var/run/postgresql
##
## Accepted values: a postgres:// URI
## Default: postgres://kemal:kemal@localhost:5432/invidious
##
#database_url: postgres://kemal:kemal@localhost:5432/invidious
##
## Enable automatic table integrity check. This will create
## the required tables and columns if anything is missing.
##
## Accepted values: true, false
## Default: false
##
#check_tables: false
#########################################
#
# Server config
#
#########################################
# -----------------------------
# Network (inbound)
# -----------------------------
##
## Port to listen on for incoming connections.
##
## Note: Ports lower than 1024 requires either root privileges
## (not recommended) or the "CAP_NET_BIND_SERVICE" capability
## (See https://stackoverflow.com/a/414258 and `man capabilities`)
##
## Accepted values: 1-65535
## Default: 3000
##
port: 3000
##
## When the invidious instance is behind a proxy, and the proxy
## listens on a different port than the instance does, this lets
## invidious know about it. This is used to craft absolute URLs
## to the instance (e.g in the API).
##
## Note: This setting is MANDATORY if invidious is behind a
## reverse proxy.
##
## Accepted values: 1-65535
## Default: <none>
##
external_port: 443
##
## Interface address to listen on for incoming connections.
##
## Accepted values: a valid IPv4 or IPv6 address.
## default: 0.0.0.0 (listen on all interfaces)
##
host_binding: 0.0.0.0
##
## Domain name under which this instance is hosted. This is
## used to craft absolute URLs to the instance (e.g in the API).
## The domain MUST be defined if your instance is accessed from
## a domain name (like 'example.com').
##
## Accepted values: a fully qualified domain name (FQDN)
## Default: <none>
##
domain: yt.trom.tf
##
## Tell Invidious that it is behind a proxy that provides only
## HTTPS, so all links must use the https:// scheme. This
## setting MUST be set to true if invidious is behind a
## reverse proxy serving HTTPs.
##
## Accepted values: true, false
## Default: false
##
https_only: true
##
## Enable/Disable 'Strict-Transport-Security'. Make sure that
## the domain specified under 'domain' is served securely.
##
## Accepted values: true, false
## Default: true
##
hsts: true
# -----------------------------
# Network (outbound)
# -----------------------------
##
## Disable proxying server-wide. Can be disable as a whole, or
## only for a single function.
##
## Accepted values: true, false, dash, livestreams, downloads, local
## Default: false
##
#disable_proxy: false
##
## Size of the HTTP pool used to connect to youtube. Each
## domain ('youtube.com', 'ytimg.com', ...) has its own pool.
##
## Accepted values: a positive integer
## Default: 100
##
#pool_size: 100
##
## Enable/Disable the use of QUIC (HTTP/3) when connecting
## to the youtube API and websites ('youtube.com', 'ytimg.com').
## QUIC's main advantages are its lower latency and lower bandwidth
## use, compared to its predecessors. However, the current version
## of QUIC used in invidious is still based on the IETF draft 31,
## meaning that the underlying library may still not be fully
## optimized. You can read more about QUIC at the link below:
## https://datatracker.ietf.org/doc/html/draft-ietf-quic-transport-31
##
## Note: you should try both options and see what is the best for your
## instance. In general QUIC is recommended for public instances. Your
## mileage may vary.
##
## Note 2: Using QUIC prevents some captcha challenges from appearing.
## See: https://github.com/iv-org/invidious/issues/957#issuecomment-576424042
##
## Accepted values: true, false
## Default: true
##
#use_quic: true
##
## Additionnal cookies to be sent when requesting the youtube API.
##
## Accepted values: a string in the format "name1=value1; name2=value2..."
## Default: <none>
##
#cookies:
##
## Force connection to youtube over a specific IP family.
##
## Note: This may sometimes resolve issues involving rate-limiting.
## See https://github.com/ytdl-org/youtube-dl/issues/21729.
##
## Accepted values: ipv4, ipv6
## Default: <none>
##
#force_resolve:
# -----------------------------
# Logging
# -----------------------------
##
## Path to log file. Can be absolute or relative to the invidious
## binary. This is overriden if "-o OUTPUT" or "--output=OUTPUT"
## are passed on the command line.
##
## Accepted values: a filesystem path or 'STDOUT'
## Default: STDOUT
##
#output: STDOUT
##
## Logging Verbosity. This is overriden if "-l LEVEL" or
## "--log-level=LEVEL" are passed on the command line.
##
## Accepted values: All, Trace, Debug, Info, Warn, Error, Fatal, Off
## Default: Info
##
#log_level: Info
# -----------------------------
# Features
# -----------------------------
##
## Enable/Disable the "Popular" tab on the main page.
##
## Accepted values: true, false
## Default: true
##
#popular_enabled: true
##
## Enable/Disable statstics (available at /api/v1/stats).
## The following data is available:
## - Software name ("invidious") and version+branch (same data as
## displayed in the footer, e.g: "2021.05.13-75e5b49" / "master")
## - The value of the 'registration_enabled' config (true/false)
## - Number of currently registered users
## - Number of registered users who connected in the last month
## - Number of registered users who connected in the last 6 months
## - Timestamp of the last server restart
## - Timestamp of the last "Channel Refresh" job execution
##
## Warning: This setting MUST be set to true if you plan to run
## a public instance. It is used by api.invidious.io to refresh
## your instance's status.
##
## Accepted values: true, false
## Default: false
##
#statistics_enabled: false
# -----------------------------
# Users and accounts
# -----------------------------
##
## Allow/Forbid Invidious (local) account creation. Invidious
## accounts allow users to subscribe to channels and to create
## playlists without a Google account.
##
## Accepted values: true, false
## Default: true
##
registration_enabled: true
##
## Allow/Forbid users to log-in. This setting affects the ability
## to connect with BOTH Google and Invidious (local) accounts.
##
## Accepted values: true, false
## Default: true
##
login_enabled: true
##
## Enable/Disable the captcha challenge on the login page.
##
## Note: this is a basic captcha challenge that doesn't
## depend on any third parties.
##
## Accepted values: true, false
## Default: true
##
captcha_enabled: true
##
## List of usernames that will be granted administrator rights.
## A user with administrator rights will be able to change the
## server configuration options listed below in /preferences,
## in addition to the usual user preferences.
##
## Server-wide settings:
## - popular_enabled
## - captcha_enabled
## - login_enabled
## - registration_enabled
## - statistics_enabled
## Default user preferences:
## - default_home
## - feed_menu
##
## Accepted values: an array of strings
## Default: [""]
##
# -----------------------------
# Background jobs
# -----------------------------
##
## Number of threads to use when crawling channel videos (during
## subscriptions update).
##
## Notes:
## - Setting this to 0 will disable the channel videos crawl job.
## - This setting is overriden if "-c THREADS" or
## "--channel-threads=THREADS" are passed on the command line.
##
## Accepted values: a positive integer
## Default: 1
##
channel_threads: 1
##
## Forcefully dump and re-download the entire list of uploaded
## videos when crawling channel (during subscriptions update).
##
## Accepted values: true, false
## Default: false
##
full_refresh: false
##
## Number of threads to use when updating RSS feeds.
##
## Notes:
## - Setting this to 0 will disable the channel videos crawl job.
## - This setting is overriden if "-f THREADS" or
## "--feed-threads=THREADS" are passed on the command line.
##
## Accepted values: a positive integer
## Default: 1
##
feed_threads: 1
##
## Enable/Disable the polling job that keeps the decryption
## function (for "secured" videos) up to date.
##
## Note: This part of the code is currently broken, so changing
## this setting has no impact.
##
## Accepted values: true, false
## Default: true
##
#decrypt_polling: true
# -----------------------------
# Captcha API
# -----------------------------
##
## URL of the captcha solving service.
##
## Accepted values: any URL
## Default: https://api.anti-captcha.com
##
#captcha_api_url: https://api.anti-captcha.com
##
## API key for the captcha solving service.
##
## Accepted values: a string
## Default: <none>
##
#captcha_key:
# -----------------------------
# Miscellanous
# -----------------------------
##
## custom banner displayed at the top of every page. This can
## used for instance announcements, e.g.
##
## Accepted values: any string. HTML is accepted.
## Default: <none>
##
#banner:
##
## Subscribe to channels using PubSubHub (Google PubSubHubbub service).
## PubSubHub allows Invidious to be instantly notified when a new video
## is published on any subscribed channels. When PubSubHub is not used,
## Invidious will check for new videos every minute.
##
## Note: This setting is recommended for public instances.
##
## Note 2:
## - Requires a public instance (it uses /feed/webhook/v1)
## - Requires 'domain' and 'hmac_key' to be set.
## - Setting this parameter to any number greater than zero will
## enable channel subscriptions via PubSubHub, but will limit the
## amount of concurrent subscriptions.
##
## Accepted values: true, false, a positive integer
## Default: false
##
#use_pubsub_feeds: false
##
## HMAC signing key used for CSRF tokens and pubsub
## subscriptions verification.
##
## Accepted values: a string
## Default: <none>
##
#hmac_key:
##
## List of video IDs where the "download" widget must be
## disabled, in order to comply with DMCA requests.
##
## Accepted values: an array of string
## Default: <none>
##
#dmca_content:
##
## Cache video annotations in the database.
##
## Warning: empty annotations or annotations that only contain
## cards won't be cached.
##
## Accepted values: true, false
## Default: false
##
#cache_annotations: false
#########################################
#
# Default user preferences
#
#########################################
##
## NOTE: All the settings below define the default user
## preferences. They will apply to ALL users connecting
## without a preferences cookie (so either on the first
## connection to the instance or after clearing the
## browser's cookies).
##
default_user_preferences:
# -----------------------------
# Internationalization
# -----------------------------
##
## Default user interface language (locale).
##
## Note: overridin the default (no preferred caption language)
## is not recommended, in order to not penalize people using
## other languages.
##
## Accepted values:
## ar (Arabic)
## da (Danish)
## de (German)
## en-US (english, US)
## el (Greek)
## eo (Esperanto)
## es (Spanish)
## fa (Persian)
## fi (Finnish)
## fr (French)
## he (Hebrew)
## hr (Hungarian)
## id (Indonesian)
## is (Icelandic)
## it (Italian)
## ja (Japanese)
## nb-NO (Norwegian, Bokmål)
## nl (Dutch)
## pl (Polish)
## pt-BR (Portuguese, Brazil)
## pt-PT (Portuguese, Portugal)
## ro (Romanian)
## ru (Russian)
## sv (Swedish)
## tr (Turkish)
## uk (Ukrainian)
## zh-CN (Chinese, China) (a.k.a "Simplified Chinese")
## zh-TW (Chinese, Taiwan) (a.k.a "Traditional Chinese")
##
## Default: en-US
##
locale: en-US
##
## Top 3 prefered languages for video captions.
##
## Note: overridin the default (no preferred
## caption language) is not recommended, in order
## to not penalize people using other languages.
##
## Accepted values: a three-entries array.
## Each entry can be one of:
## "English", "English (auto-generated)",
## "Afrikaans", "Albanian", "Amharic", "Arabic",
## "Armenian", "Azerbaijani", "Bangla", "Basque",
## "Belarusian", "Bosnian", "Bulgarian", "Burmese",
## "Catalan", "Cebuano", "Chinese (Simplified)",
## "Chinese (Traditional)", "Corsican", "Croatian",
## "Czech", "Danish", "Dutch", "Esperanto", "Estonian",
## "Filipino", "Finnish", "French", "Galician", "Georgian",
## "German", "Greek", "Gujarati", "Haitian Creole", "Hausa",
## "Hawaiian", "Hebrew", "Hindi", "Hmong", "Hungarian",
## "Icelandic", "Igbo", "Indonesian", "Irish", "Italian",
## "Japanese", "Javanese", "Kannada", "Kazakh", "Khmer",
## "Korean", "Kurdish", "Kyrgyz", "Lao", "Latin", "Latvian",
## "Lithuanian", "Luxembourgish", "Macedonian",
## "Malagasy", "Malay", "Malayalam", "Maltese", "Maori",
## "Marathi", "Mongolian", "Nepali", "Norwegian Bokmål",
## "Nyanja", "Pashto", "Persian", "Polish", "Portuguese",
## "Punjabi", "Romanian", "Russian", "Samoan",
## "Scottish Gaelic", "Serbian", "Shona", "Sindhi",
## "Sinhala", "Slovak", "Slovenian", "Somali",
## "Southern Sotho", "Spanish", "Spanish (Latin America)",
## "Sundanese", "Swahili", "Swedish", "Tajik", "Tamil",
## "Telugu", "Thai", "Turkish", "Ukrainian", "Urdu",
## "Uzbek", "Vietnamese", "Welsh", "Western Frisian",
## "Xhosa", "Yiddish", "Yoruba", "Zulu"
##
## Default: ["", "", ""]
##
#captions: ["", "", ""]
# -----------------------------
# Interface
# -----------------------------
##
## Enable/Disable dark mode.
##
## Accepted values: true, false
## Default: <none>
##
dark_mode: false
##
## Enable/Disable thin mode (no video thumbnails).
##
## Accepted values: true, false
## Default: false
##
#thin_mode: false
##
## List of feeds available on the home page.
##
## Note: "Subscriptions" and "Playlists" are only visible
## when the user is logged in.
##
## Accepted values: A list of strings
## Each entry can be one of: "Popular", "Trending",
## "Subscriptions", "Playlists"
##
## Default: ["Popular", "Trending", "Subscriptions", "Playlists"] (show all feeds)
##
#feed_menu: ["Popular", "Trending", "Subscriptions", "Playlists"]
##
## Default feed to diplay on the home page.
##
## Note: setting this option to "Popular" has no
## effect when 'popular_enabled' is set to false.
##
## Accepted values: Popular, Trending, Subscriptions, Playlists, <none>
## Default: Popular
##
#default_home: Popular
##
## Default number of results to display per page.
##
## Note: this affects invidious-generated pages only, such
## as watch history and subscription feeds. Playlists, search
## results and channel videos depend on the data returned by
## the Youtube API.
##
## Accepted values: any positive integer
## Default: 40
##
#max_results: 40
##
## Show/hide annotations.
##
## Accepted values: true, false
## Default: false
##
#annotations: false
##
## Show/hide annotation.
##
## Accepted values: true, false
## Default: false
##
#annotations_subscribed: false
##
## Type of comments to display below video.
##
## Accepted values: a two-entries array.
## Each entry can be one of: "youtube", "reddit", ""
##
## Default: ["youtube", ""]
##
#comments: ["youtube", ""]
##
## Default player style.
##
## Accepted values: invidious, youtube
## Default: invidious
##
#player_style: invidious
##
## Show/Hide the "related videos" sidebar when
## watching a video.
##
## Accepted values: true, false
## Default: true
##
#related_videos: true
# -----------------------------
# Video player behavior
# -----------------------------
##
## Automatically play videos on page load.
##
## Accepted values: true, false
## Default: false
##
#autoplay: false
##
## Automatically load the "next" video (either next in
## playlist or proposed) when the current video ends.
##
## Accepted values: true, false
## Default: false
##
#continue: false
##
## Autoplay next video by default.
##
## Note: Only effective if 'continue' is set to true.
##
## Accepted values: true, false
## Default: true
##
#continue_autoplay: true
##
## Play videos in Audio-only mode by default.
##
## Accepted values: true, false
## Default: false
##
#listen: false
##
## Loop videos automatically.
##
## Accepted values: true, false
## Default: false
##
#video_loop: false
# -----------------------------
# Video playback settings
# -----------------------------
##
## Default video quality.
##
## Accepted values: dash, hd720, medium, small
## Default: hd720
##
quality: hd720
##
## Default dash video quality.
##
## Note: this setting only takes effet if the
## 'quality' parameter is set to "dash".
##
## Accepted values:
## auto, best, 4320p, 2160p, 1440p, 1080p,
## 720p, 480p, 360p, 240p, 144p, worst
## Default: auto
##
#quality_dash: auto
##
## Default video playback speed.
##
## Accepted values: 0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0
## Default: 1.0
##
#speed: 1.0
##
## Default volume.
##
## Accepted values: 0-100
## Default: 100
##
#volume: 100
##
## Allow 360° videos to be played.
##
## Note: This feature requires a WebGL-enabled browser.
##
## Accepted values: true, false
## Default: true
##
#vr_mode: true
# -----------------------------
# Subscription feed
# -----------------------------
##
## In the "Subscription" feed, only show the latest video
## of each channel the user is subscribed to.
##
## Note: when combined with 'unseen_only', the latest unseen
## video of each channel will be displayed instead of the
## latest by date.
##
## Accepted values: true, false
## Default: false
##
#latest_only: false
##
## Enable/Disable user subscriptions desktop notifications.
##
## Accepted values: true, false
## Default: false
##
#notifications_only: false
##
## In the "Subscription" feed, Only show the videos that the
## user haven't watched yet (i.e which are not in their watch
## history).
##
## Accepted values: true, false
## Default: false
##
#unseen_only: false
##
## Default sorting parameter for subscription feeds.
##
## Accepted values:
## 'alphabetically'
## 'alphabetically - reverse'
## 'channel name'
## 'channel name - reverse'
## 'published'
## 'published - reverse'
##
## Default: published
##
#sort: published
# -----------------------------
# Miscellanous
# -----------------------------
##
## Proxy videos through instance by default.
##
## Warning: As most users won't change this setting in their
## preferences, defaulting to true will significantly
## increase the instance's network usage, so make sure that
## your server's connection can handle it.
##
## Accepted values: true, false
## Default: false
##
#local: false
##
## Show the connected user's nick at the top right.
##
## Accepted values: true, false
## Default: true
##
#show_nick: true
##
## Automatically redirect to a random instance when the user uses
## any "switch invidious instance" link (For videos, it's the plane
## icon, next to "watch on youtube" and "listen"). When set to false,
## the user is sent to https://redirect.invidious.io instead, where
## they can manually select an instance.
##
## Accepted values: true, false
## Default: false
##
#automatic_instance_redirect: false
I just realized that the domain: yt.trom.tf while the correct one is ytb.trom.tf. I fixed that and restarted invidious. You think that could have been the issue? Mind you, the instance worked for the past days with these setups, only today started to jump to that error quite often.
Note: edited by @SamantazFox to collapse config
I just realized that the
domain: yt.trom.tfwhile the correct one is ytb.trom.tf. I fixed that and restarted invidious. You think that could have been the issue? Mind you, the instance worked for the past days with these setups, only today started to jump to that error quite often.
No I don't think so, could be that you are getting more traffic than before. What you can do is to either run multiple invidious processes behind a reverse proxy or increase the ulimit like shown multiple times in this issue.
I understand. Thanks!
@tio-trom can you try to compile invidious without QUIC?
make DISABLE_QUIC=1
I am sorry but this is beyond me right now, time-wise and skills-wize. The instance seems to be working now quite well....I don't understand computers :D
Just an update my ulimit is "unlimited". Yet I still see that error that results in a 504 nginx. At time it works for many days....then won't work for like a day, then may work again for a week. I don't understand it. Restarting it does not help. Rebooting the server may help at times. I wonder what other service needs to be restarted. It kinda coincides with Nitter showing the same error and not working at the same time, on the same server...I wonder if the two have some sort of conflicts.
@tio-trom Thanks for the update! That could also be an issue with openSSL itself... I wonder if the problem would be present with a different SSL lib...
After doing more tests, killing the process /var/www/invidious/invidious -o invidious.log brings back the instance for a while. Should I try and change the log mode in config?...