{"record":{"id":"4607ea789b98844b","repo":"TechnitiumSoftware/DnsServer","slug":"valid-range-is-from-1000-to-90000","errorCode":null,"errorMessage":"Valid range is from 1000 to 90000.","messagePattern":"Valid range is from 1000 to 90000\\.","errorType":"exception","errorClass":"ArgumentOutOfRangeException","httpStatus":null,"severity":"error","filePath":"DnsServerCore/Dns/DnsServer.cs","lineNumber":7518,"sourceCode":"        public int ClientTimeout\n        {\n            get { return _clientTimeout; }\n            set\n            {\n                if ((value < 1000) || (value > 10000))\n                    throw new ArgumentOutOfRangeException(nameof(ClientTimeout), \"Valid range is from 1000 to 10000.\");\n\n                _clientTimeout = value;\n            }\n        }\n\n        public int TcpSendTimeout\n        {\n            get { return _tcpSendTimeout; }\n            set\n            {\n                if ((value < 1000) || (value > 90000))\n                    throw new ArgumentOutOfRangeException(nameof(TcpSendTimeout), \"Valid range is from 1000 to 90000.\");\n\n                _tcpSendTimeout = value;\n            }\n        }\n\n        public int TcpReceiveTimeout\n        {\n            get { return _tcpReceiveTimeout; }\n            set\n            {\n                if ((value < 1000) || (value > 90000))\n                    throw new ArgumentOutOfRangeException(nameof(TcpReceiveTimeout), \"Valid range is from 1000 to 90000.\");\n\n                _tcpReceiveTimeout = value;\n            }\n        }\n\n        public int QuicIdleTimeout","sourceCodeStart":7500,"sourceCodeEnd":7536,"githubUrl":"https://github.com/TechnitiumSoftware/DnsServer/blob/d0484b6c1e7439cdc53d67d81e9c876cda2ad756/DnsServerCore/Dns/DnsServer.cs#L7500-L7536","documentation":"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.","triggerScenarios":"Setting server.TcpSendTimeout to an int < 1000 or > 90000.","commonSituations":"Passing seconds instead of milliseconds; setting an aggressive sub-second timeout; config file with a value outside the allowed band.","solutions":["Set a value between 1000 and 90000 milliseconds (e.g. 15000 for 15 seconds).","Convert seconds-based config values to milliseconds."],"exampleFix":"// before\nserver.TcpSendTimeout = 500; // throws, below floor\n\n// after\nserver.TcpSendTimeout = 15000;","handlingStrategy":"validation","validationCode":"int safeTimeout = Math.Clamp(value, 1000, 90000);\nserver.TcpSendTimeout = safeTimeout;","typeGuard":"static bool IsValidTcpTimeout(int ms) => ms >= 1000 && ms <= 90000;","tryCatchPattern":"try { server.TcpSendTimeout = value; }\ncatch (ArgumentOutOfRangeException) { server.TcpSendTimeout = 15000; }","preventionTips":["Convert seconds-based config to milliseconds.","Keep send and receive timeouts consistent in units."],"tags":["dns","timeout","tcp","configuration"],"backgroundTag":null,"analyzedSha":"d0484b6c1e7439cdc53d67d81e9c876cda2ad756","analyzedAt":"2026-08-13T22:57:35.508Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}