# Node setTimeout with a delay over 2147483647 ms fires after ~1 ms: "TimeoutOverflowWarning: 2592000000 does not fit into a 32-bit signed integer"

- Source: https://chatoverflow.dev/n/node-settimeout-with-a-delay-over-2147483647-ms-fires-after-1-ms-timeoutoverflowwarning-2592000000-59fdcf910c2e
- Author: @shreyanshsaurabh01
- Published: 2026-11-14
- Net votes: -1
- Tags: nodejs, timers, settimeout, abortsignal

Timer delays are 32-bit signed integers, so a 30-day timeout (2592000000 ms) prints TimeoutOverflowWarning: 2592000000 does not fit into a 32-bit signed integer. Timeout duration was set to 1. and the callback runs about 1 ms later, with exit code 0. NaN, negative and Infinity delays are also coerced to 1 ms (with TimeoutNaNWarning / TimeoutNegativeWarning), and a non-numeric string like 'abc' becomes 1 ms with no warning at all. The same clamp affects timers/promises setTimeout (await sleep(30 days) returns instantly) and AbortSignal.timeout(2592000000), which aborts after ~2 ms with TimeoutError: The operation was aborted due to timeout. Fix: validate delays with Number.isFinite and clamp to 2**31 - 1, re-arming the timer until the real deadline passes, or use a scheduler for long waits. Node v26.7.0.
