PeerTube 7.3.0 logs filling up /var/log/syslog on Ubuntu 24.04

Hello,

I installed PeerTube version 7.3.0 on Ubuntu Server 24.04, following the official installation guide from your website. After a few hours of running, my server becomes unresponsive because /var/log/syslog is completely filled with PeerTube logs.

I cannot figure out why PeerTube logs are being written into /var/log/syslog. On other servers with the same configuration, logs only go to journalctl -u peertube and to PeerTube’s own log files in /var/www/peertube/storage/logs/.

Has anyone experienced this issue? How can I prevent PeerTube from flooding /var/log/syslog while still keeping normal PeerTube logs?

Thank you!

This message repeats constantly and fills up /var/log/syslog:

2025-09-24T03:34:36.515276+03:00 v0 peertube[1874]: Timeout duration was set to 1.
2025-09-24T03:34:36.516502+03:00 v0 peertube[1874]: (node:1874) TimeoutOverflowWarning: 2419199280 does not fit into a 32-bit signed integer.
2025-09-24T03:34:36.516567+03:00 v0 peertube[1874]: Timeout duration was set to 1.
2025-09-24T03:34:36.517679+03:00 v0 peertube[1874]: (node:1874) TimeoutOverflowWarning: 2419199279 does not fit into a 32-bit signed integer.
2025-09-24T03:34:36.517700+03:00 v0 peertube[1874]: Timeout duration was set to 1.
2025-09-24T03:34:36.518959+03:00 v0 peertube[1874]: (node:1874) TimeoutOverflowWarning: 2419199278 does not fit into a 32-bit signed integer.
2025-09-24T03:34:36.519024+03:00 v0 peertube[1874]: Timeout duration was set to 1.
2025-09-24T03:34:36.520140+03:00 v0 peertube[1874]: (node:1874) TimeoutOverflowWarning: 2419199277 does not fit into a 32-bit signed integer.
2025-09-24T03:34:36.520173+03:00 v0 peertube[1874]: Timeout duration was set to 1.
2025-09-24T03:34:36.521328+03:00 v0 peertube[1874]: (node:1874) TimeoutOverflowWarning: 2419199275 does not fit into a 32-bit signed integer.
2025-09-24T03:34:36.521346+03:00 v0 peertube[1874]: Timeout duration was set to 1.

I’m sorry I don’t know where these logs come from. Maybe from nodejs itself?

The existence of /var/log/syslog can depends on various parameters. For example, it was replaced by binary logs in /var/log/journal/... in Debian bookworm (those who are read by journalctl).

/var/log/syslog (and co) can be present on Debian bookworm/trixie if you install rsyslog for example.

I don’t know how it works on Ubuntu, but as it is based on Debian, there are good chances that the same change was applied.

So, i guess the difference you see between your servers is related to the OS version (or maybe the first installation OS version, and the behavior was kept after upgrading).

If Peertube write in the syslog (either /var/log/syslog and /var/log/journal/), it is because of the SyslogIdentifier parameter in the systemd configuration file: PeerTube/support/systemd/peertube.service at develop · Chocobozzz/PeerTube · GitHub

They are ways to disable it, check the systemd documentation if you want to.

Concerning the error message you get, sorry, i don’t know what it means.

What is your CPU? Is it 64bits?

What’s your node version?

Hum…

Regarding this post first answer, the setTimeout JS function is limited to 32bits integers. And it seem that some part of the code on your instance tries to set a too big value (2419199277 or 2419199279 for example). This is something like 76 years.

Can you check your Peertube configuration, to see if you have set some big duration value for some parameters? Or maybe this comes from a plugin?

CPU: 64bits

Node: v20.19.5

Details from my server grep:

$ grep -Rn « setTimeout » dist | head
dist/core/controllers/tracker.js:49: setTimeout(() => params.socket.close(), 0);
dist/core/middlewares/cache/shared/api-cache.js:104: this.timers[key] = setTimeout(() => {
dist/core/lib/video-captions.js:125: setTimeout(() => inputFileMutexReleaser(), 1000);
dist/core/lib/hls.js:178: timer = setTimeout(() => {
dist/core/lib/live/live-manager.js:69: setTimeout(() => this.abortSession(sessionId), 2000);
dist/core/lib/live/shared/muxing-session.js:283: setTimeout(() => {
dist/core/helpers/youtube-dl/youtube-dl-cli.js:146: setTimeout(() => subProcess.kill(), timeout);
dist/core/helpers/debounce.js:7: timeoutRef = setTimeout(() => {
dist/core/helpers/webtorrent.js:65: timer = setTimeout(() => {

$ grep -RnE « 86400000|24*60*60|day|days » dist | head
dist/core/controllers/plugins.js:15: maxAge: ‹ 30 days ›,
dist/core/initializers/constants.js:92: SITEMAP: ‹ 1 day ›,
dist/core/initializers/constants.js:100: WELL_KNOWN: ‹ 1 day ›
dist/core/initializers/constants.js:221: ‹ DEFAULT ›: parseDurationToMs(‹ 2 days ›),
dist/core/initializers/constants.js:228: DEFAULT: parseDurationToMs(‹ 7 days ›)

ChatGPT recommended me to run:

sudo systemctl edit peertube

[Service]
Environment=NODE_NO_WARNINGS=1

Worst advice ever lmao. This will only hide the issue.

Sorry, i don’t know what part of the code is responsible for this warning. No Peertube plugin installed?

No, I don’t have any plugin installed. At the moment I’ve stopped all PeerTube-related logs from going into syslog.

Hi, these logs are taken when PeerTube crashes, for example due to a misconfiguration. The file can grow to an incredible size in a short time. Once the crash is fixed, the logs stop growing. I encountered this when my configuration was misconfigured; after about three hours, my syslog file was huge.

Hi again,
I have an update and also a question that might help identify the root cause.

I migrated everything to a brand-new server running PeerTube v8 (clean install, Node 22, fresh production.yaml, etc.).
Surprisingly, the same syslog spam issue still appears:

2025-12-02T16:44:02.644525+02:00 v0 systemd[1]: Starting systemd-tmpfiles-clean.service - Cleanup of Temporary Directories…
2025-12-02T16:44:02.669839+02:00 v0 systemd[1]: systemd-tmpfiles-clean.service: Deactivated successfully.
2025-12-02T16:44:02.670042+02:00 v0 systemd[1]: Finished systemd-tmpfiles-clean.service - Cleanup of Temporary Directories.
2025-12-02T16:44:14.122103+02:00 v0 peertube[2005]: (node:2005) TimeoutOverflowWarning: 2419044637 does not fit into a 32-bit signed integer.
2025-12-02T16:44:14.122337+02:00 v0 peertube[2005]: Timeout duration was set to 1.
2025-12-02T16:44:14.122365+02:00 v0 peertube[2005]: (Use node --trace-warnings ... to show where the warning was created)
2025-12-02T16:44:14.122409+02:00 v0 peertube[2005]: (node:2005) TimeoutOverflowWarning: 2419044636 does not fit into a 32-bit signed integer.
2025-12-02T16:44:14.122432+02:00 v0 peertube[2005]: Timeout duration was set to 1.
2025-12-02T16:44:14.123338+02:00 v0 peertube[2005]: (node:2005) TimeoutOverflowWarning: 2419044634 does not fit into a 32-bit signed integer.
2025-12-02T16:44:14.123367+02:00 v0 peertube[2005]: Timeout duration was set to 1.
2025-12-02T16:44:14.124769+02:00 v0 peertube[2005]: (node:2005) TimeoutOverflowWarning: 2419044633 does not fit into a 32-bit signed integer.
2025-12-02T16:44:14.124793+02:00 v0 peertube[2005]: Timeout duration was set to 1.
2025-12-02T16:44:14.126358+02:00 v0 peertube[2005]: (node:2005) TimeoutOverflowWarning: 2419044632 does not fit into a 32-bit signed integer.
2025-12-02T16:44:14.126382+02:00 v0 peertube[2005]: Timeout duration was set to 1.
2025-12-02T16:44:14.127843+02:00 v0 peertube[2005]: (node:2005) TimeoutOverflowWarning: 2419044630 does not fit into a 32-bit signed integer.
2025-12-02T16:44:14.127867+02:00 v0 peertube[2005]: Timeout duration was set to 1.
2025-12-02T16:44:14.129195+02:00 v0 peertube[2005]: (node:2005) TimeoutOverflowWarning: 2419044629 does not fit into a 32-bit signed integer.
2025-12-02T16:44:14.129219+02:00 v0 peertube[2005]: Timeout duration was set to 1.
2025-12-02T16:44:14.130594+02:00 v0 peertube[2005]: (node:2005) TimeoutOverflowWarning: 2419044627 does not fit into a 32-bit signed integer.
2025-12-02T16:44:14.130631+02:00 v0 peertube[2005]: Timeout duration was set to 1.

After some investigation, I noticed that in my production.yaml I had the following setting:

views:
videos:
remote:
max_age: ‹ 30 days ›

Since Node.js can only handle timeouts up to ~24.8 days (2,147,483,647 ms), anything above that automatically triggers a TimeoutOverflowWarning, which fits the numbers I see in the logs.

So my question is:

Could this setting max_age: '30 days' be the cause of the repeated TimeoutOverflowWarning messages?

One more detail that might be relevant:

On the new server running PeerTube v8, I only imported the database from the old v7.3 instance (the one that had the syslog spam issue).
I did not copy the old production.yaml — I generated a fresh production.yaml on the new server and configured everything manually.

So the database is the same, but the configuration file is new. Could the issue also come from the database?

max_age: ‹ 30 days › - that’s not the problem, I’ll try to look further.

I added Environment=NODE_OPTIONS=–trace-warnings

And I received the following errors:

2025-12-03T15:12:07.054265+02:00 v0 peertube[2020]: (node:2020) TimeoutOverflowWarning: 2419200000 does not fit into a 32-bit signed integer.
2025-12-03T15:12:07.056001+02:00 v0 peertube[2020]: Timeout duration was set to 1.
2025-12-03T15:12:07.056080+02:00 v0 peertube[2020]: at new Timeout (node:internal/timers:179:17)
2025-12-03T15:12:07.056123+02:00 v0 peertube[2020]: at setTimeout (node:timers:138:19)
2025-12-03T15:12:07.056164+02:00 v0 peertube[2020]: at CacheableLookup._tick (file:///var/www/peertube/versions/peertube-v8.0.0-rc.1/node_modules/.pnpm/cacheable-lookup@7.0.0/node_modules/cacheable-lookup/source/index.js:371:27)
2025-12-03T15:12:07.056207+02:00 v0 peertube[2020]: at CacheableLookup._set (file:///var/www/peertube/versions/peertube-v8.0.0-rc.1/node_modules/.pnpm/cacheable-lookup@7.0.0/node_modules/cacheable-lookup/source/index.js:336:10)
2025-12-03T15:12:07.056248+02:00 v0 peertube[2020]: at async CacheableLookup.queryAndCache (file:///var/www/peertube/versions/peertube-v8.0.0-rc.1/node_modules/.pnpm/cacheable-lookup@7.0.0/node_modules/cacheable-lookup/source/index.js:358:3)
2025-12-03T15:12:07.056299+02:00 v0 peertube[2020]: at async CacheableLookup.query (file:///var/www/peertube/versions/peertube-v8.0.0-rc.1/node_modules/.pnpm/cacheable-lookup@7.0.0/node_modules/cacheable-lookup/source/index.js:235:15)
2025-12-03T15:12:07.056341+02:00 v0 peertube[2020]: at async CacheableLookup.lookupAsync (file:///var/www/peertube/versions/peertube-v8.0.0-rc.1/node_modules/.pnpm/cacheable-lookup@7.0.0/node_modules/cacheable-lookup/source/index.js:178:16)
2025-12-03T15:12:07.056382+02:00 v0 peertube[2020]: at async protect (file:///var/www/peertube/versions/peertube-v8.0.0-rc.1/node_modules/.pnpm/got-ssrf@3.0.0_got@14.6.3/node_modules/got-ssrf/dist/index.js:46:29)
2025-12-03T15:12:07.056422+02:00 v0 peertube[2020]: at async Request._makeRequest (file:///var/www/peertube/versions/peertube-v8.0.0-rc.1/node_modules/.pnpm/got@14.6.3/node_modules/got/dist/source/core/index.js:1113:28)
2025-12-03T15:12:07.056462+02:00 v0 peertube[2020]: at async Request.flush (file:///var/www/peertube/versions/peertube-v8.0.0-rc.1/node_modules/.pnpm/got@14.6.3/node_modules/got/dist/source/core/index.js:175:13)
2025-12-03T15:12:07.056532+02:00 v0 peertube[2020]: (node:2020) TimeoutOverflowWarning: 2419199990 does not fit into a 32-bit signed integer.
2025-12-03T15:12:07.056573+02:00 v0 peertube[2020]: Timeout duration was set to 1.
2025-12-03T15:12:07.056606+02:00 v0 peertube[2020]: at new Timeout (node:internal/timers:179:17)
2025-12-03T15:12:07.056638+02:00 v0 peertube[2020]: at setTimeout (node:timers:138:19)
2025-12-03T15:12:07.056672+02:00 v0 peertube[2020]: at CacheableLookup._tick (file:///var/www/peertube/versions/peertube-v8.0.0-rc.1/node_modules/.pnpm/cacheable-lookup@7.0.0/node_modules/cacheable-lookup/source/index.js:371:27)
2025-12-03T15:12:07.056705+02:00 v0 peertube[2020]: at Timeout. (file:///var/www/peertube/versions/peertube-v8.0.0-rc.1/node_modules/.pnpm/cacheable-lookup@7.0.0/node_modules/cacheable-lookup/source/index.js:389:11)
2025-12-03T15:12:07.056743+02:00 v0 peertube[2020]: at listOnTimeout (node:internal/timers:588:17)
2025-12-03T15:12:07.056782+02:00 v0 peertube[2020]: at process.processTimers (node:internal/timers:523:7)
2025-12-03T15:12:07.056827+02:00 v0 peertube[2020]: (node:2020) TimeoutOverflowWarning: 2419199989 does not fit into a 32-bit signed integer.
2025-12-03T15:12:07.056866+02:00 v0 peertube[2020]: Timeout duration was set to 1.
2025-12-03T15:12:07.056898+02:00 v0 peertube[2020]: at new Timeout (node:internal/timers:179:17)
2025-12-03T15:12:07.056929+02:00 v0 peertube[2020]: at setTimeout (node:timers:138:19)
2025-12-03T15:12:07.056962+02:00 v0 peertube[2020]: at CacheableLookup._tick (file:///var/www/peertube/versions/peertube-v8.0.0-rc.1/node_modules/.pnpm/cacheable-lookup@7.0.0/node_modules/cacheable-lookup/source/index.js:371:27)
2025-12-03T15:12:07.056995+02:00 v0 peertube[2020]: at Timeout. (file:///var/www/peertube/versions/peertube-v8.0.0-rc.1/node_modules/.pnpm/cacheable-lookup@7.0.0/node_modules/cacheable-lookup/source/index.js:389:11)
2025-12-03T15:12:07.057040+02:00 v0 peertube[2020]: at listOnTimeout (node:internal/timers:588:17)
2025-12-03T15:12:07.057073+02:00 v0 peertube[2020]: at process.processTimers (node:internal/timers:523:7)
2025-12-03T15:12:07.057214+02:00 v0 peertube[2020]: (node:2020) TimeoutOverflowWarning: 2419199988 does not fit into a 32-bit signed integer.
2025-12-03T15:12:07.057309+02:00 v0 peertube[2020]: Timeout duration was set to 1.
2025-12-03T15:12:07.057338+02:00 v0 peertube[2020]: at new Timeout (node:internal/timers:179:17)
2025-12-03T15:12:07.057363+02:00 v0 peertube[2020]: at setTimeout (node:timers:138:19)
2025-12-03T15:12:07.057397+02:00 v0 peertube[2020]: at CacheableLookup._tick (file:///var/www/peertube/versions/peertube-v8.0.0-rc.1/node_modules/.pnpm/cacheable-lookup@7.0.0/node_modules/cacheable-lookup/source/index.js:371:27)
2025-12-03T15:12:07.057424+02:00 v0 peertube[2020]: at Timeout. (file:///var/www/peertube/versions/peertube-v8.0.0-rc.1/node_modules/.pnpm/cacheable-lookup@7.0.0/node_modules/cacheable-lookup/source/index.js:389:11)
2025-12-03T15:12:07.057448+02:00 v0 peertube[2020]: at listOnTimeout (node:internal/timers:588:17)
2025-12-03T15:12:07.057472+02:00 v0 peertube[2020]: at process.processTimers (node:internal/timers:523:7)
2025-12-03T15:12:07.057512+02:00 v0 peertube[2020]: (node:2020) TimeoutOverflowWarning: 2419199987 does not fit into a 32-bit signed integer.
2025-12-03T15:12:07.057541+02:00 v0 peertube[2020]: Timeout duration was set to 1.
2025-12-03T15:12:07.057563+02:00 v0 peertube[2020]: at new Timeout (node:internal/timers:179:17)
2025-12-03T15:12:07.057585+02:00 v0 peertube[2020]: at setTimeout (node:timers:138:19)
2025-12-03T15:12:07.057610+02:00 v0 peertube[2020]: at CacheableLookup._tick (file:///var/www/peertube/versions/peertube-v8.0.0-rc.1/node_modules/.pnpm/cacheable-lookup@7.0.0/node_modules/cacheable-lookup/source/index.js:371:27)
2025-12-03T15:12:07.057634+02:00 v0 peertube[2020]: at Timeout. (file:///var/www/peertube/versions/peertube-v8.0.0-rc.1/node_modules/.pnpm/cacheable-lookup@7.0.0/node_modules/cacheable-lookup/source/index.js:389:11)
2025-12-03T15:12:07.057673+02:00 v0 peertube[2020]: at listOnTimeout (node:internal/timers:588:17)
2025-12-03T15:12:07.057712+02:00 v0 peertube[2020]: at process.processTimers (node:internal/timers:523:7)
2025-12-03T15:12:07.058400+02:00 v0 peertube[2020]: (node:2020) TimeoutOverflowWarning: 2419199986 does not fit into a 32-bit signed integer.
2025-12-03T15:12:07.058431+02:00 v0 peertube[2020]: Timeout duration was set to 1.

The root cause seems to be that CacheableLookup sets a timeout based on DNS TTL, and some TTL values produce a duration that exceeds Node’s maximum allowed timeout (2^31-1 ms).

This happens especially when:

  • DNS TTL values are high (days or weeks)

  • cacheTtl * 1000 overflows Node’s timeout limit

As a temporary fix I patched the local file:

/var/www/peertube/versions/peertube-v8.0.0-rc.1/node_modules/.pnpm/cacheable-lookup@7.0.0/node_modules/cacheable-lookup/source/index.js

and added a hard cap:

constMAX_TIMEOUT_MS = 2_000_000_000; // ~23 days, below Node.js limit

Then modified _set():

cacheTtl = Math.min(cacheTtl, this.maxTtl) * 1000;

if (cacheTtl > MAX_TIMEOUT_MS) {
cacheTtl = MAX_TIMEOUT_MS;
}

data[kExpires] = Date.now() + cacheTtl;

I hope this solves the problem, but we’ll see in the future.

1 « J'aime »

Oh wow, good catch!

You should report the issue here:

1 « J'aime »