TechnitiumSoftware/DnsServer · error · ArgumentOutOfRangeException
Valid range is from 1000 to 90000.
Error message
Valid range is from 1000 to 90000.
What it means
Thrown by the TcpSendTimeout property setter when the value is below 1000ms or above 90000ms. This controls the TCP send timeout for DNS responses over TCP, ranging from 1 second to 90 seconds.
Source
Thrown at DnsServerCore/Dns/DnsServer.cs:7518
public int ClientTimeout
{
get { return _clientTimeout; }
set
{
if ((value < 1000) || (value > 10000))
throw new ArgumentOutOfRangeException(nameof(ClientTimeout), "Valid range is from 1000 to 10000.");
_clientTimeout = value;
}
}
public int TcpSendTimeout
{
get { return _tcpSendTimeout; }
set
{
if ((value < 1000) || (value > 90000))
throw new ArgumentOutOfRangeException(nameof(TcpSendTimeout), "Valid range is from 1000 to 90000.");
_tcpSendTimeout = value;
}
}
public int TcpReceiveTimeout
{
get { return _tcpReceiveTimeout; }
set
{
if ((value < 1000) || (value > 90000))
throw new ArgumentOutOfRangeException(nameof(TcpReceiveTimeout), "Valid range is from 1000 to 90000.");
_tcpReceiveTimeout = value;
}
}
public int QuicIdleTimeoutView on GitHub (pinned to d0484b6c1e)
Solutions
- Set a value between 1000 and 90000 milliseconds (e.g. 15000 for 15 seconds).
- Convert seconds-based config values to milliseconds.
Example fix
// before server.TcpSendTimeout = 500; // throws, below floor // after server.TcpSendTimeout = 15000;
Defensive patterns
Strategy: validation
Validate before calling
int safeTimeout = Math.Clamp(value, 1000, 90000); server.TcpSendTimeout = safeTimeout;
Type guard
static bool IsValidTcpTimeout(int ms) => ms >= 1000 && ms <= 90000;
Try / catch
try { server.TcpSendTimeout = value; }
catch (ArgumentOutOfRangeException) { server.TcpSendTimeout = 15000; } Prevention
- Convert seconds-based config to milliseconds.
- Keep send and receive timeouts consistent in units.
When it happens
Trigger: Setting server.TcpSendTimeout to an int < 1000 or > 90000.
Common situations: Passing seconds instead of milliseconds; setting an aggressive sub-second timeout; config file with a value outside the allowed band.
Related errors
- Valid range is from 1000 to 10000.
- Cannot update DNS zone '{zoneInfo.DisplayName}': not a prima
- Cannot update reverse DNS zone '{reverseZoneInfo.DisplayName
- Port 853 is reserved for DNS-over-TLS service. Please use a
- Networks cannot have more than 255 entries.
AI-assisted analysis of TechnitiumSoftware/DnsServer@d0484b6c1e (2026-08-13).
Data as JSON: /api/errors/4607ea789b98844b.
Report an issue: GitHub.