{"record":{"id":"6212fc3863c59bbd","repo":"TechnitiumSoftware/DnsServer","slug":"valid-range-is-from-1000-to-10000","errorCode":null,"errorMessage":"Valid range is from 1000 to 10000.","messagePattern":"Valid range is from 1000 to 10000\\.","errorType":"exception","errorClass":"ArgumentOutOfRangeException","httpStatus":null,"severity":"error","filePath":"DnsServerCore/Dns/DnsServer.cs","lineNumber":7506,"sourceCode":"            get { return _qpmLimitBypassList; }\n            set\n            {\n                if ((value is null) || (value.Count == 0))\n                    _qpmLimitBypassList = null;\n                else if (value.Count > byte.MaxValue)\n                    throw new ArgumentOutOfRangeException(nameof(QpmLimitBypassList), \"Networks cannot have more than 255 entries.\");\n                else\n                    _qpmLimitBypassList = value;\n            }\n        }\n\n        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","sourceCodeStart":7488,"sourceCodeEnd":7524,"githubUrl":"https://github.com/TechnitiumSoftware/DnsServer/blob/d0484b6c1e7439cdc53d67d81e9c876cda2ad756/DnsServerCore/Dns/DnsServer.cs#L7488-L7524","documentation":"Thrown by the ClientTimeout property setter when the value is below 1000ms or above 10000ms. This controls how long the server waits for a client response (e.g. zone transfer ack) before timing out, expressed in milliseconds.","triggerScenarios":"Setting server.ClientTimeout to an int < 1000 or > 10000.","commonSituations":"Passing seconds instead of milliseconds (e.g. 5 meaning 5s but interpreted as 5ms — below floor); setting 0 to disable timeout; loading a config with wrong units.","solutions":["Set a value between 1000 and 10000 milliseconds (e.g. 5000 for 5 seconds).","If your config uses seconds, multiply by 1000 before assignment."],"exampleFix":"// before\nserver.ClientTimeout = 5; // meant 5 seconds, throws\n\n// after\nserver.ClientTimeout = 5000; // 5 seconds in ms","handlingStrategy":"validation","validationCode":"int safeTimeout = Math.Clamp(value, 1000, 10000);\nserver.ClientTimeout = safeTimeout;","typeGuard":"static bool IsValidClientTimeout(int ms) => ms >= 1000 && ms <= 10000;","tryCatchPattern":"try { server.ClientTimeout = value; }\ncatch (ArgumentOutOfRangeException) { server.ClientTimeout = 5000; }","preventionTips":["Always specify timeout in milliseconds, not seconds.","Clamp config-sourced values before assignment."],"tags":["dns","timeout","client","configuration"],"backgroundTag":null,"analyzedSha":"d0484b6c1e7439cdc53d67d81e9c876cda2ad756","analyzedAt":"2026-08-13T22:57:35.508Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}