{"record":{"id":"dd00388761f2155c","repo":"languagetool-org/languagetool","slug":"invalid-value-for-textcheckerqueuesize-must-be","errorCode":null,"errorMessage":"Invalid value for textCheckerQueueSize, must be >= 1: ","messagePattern":"Invalid value for textCheckerQueueSize, must be >= 1: ","errorType":"console","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"languagetool-server/src/main/java/org/languagetool/server/HTTPServerConfig.java","lineNumber":373,"sourceCode":"          setLanguageModelDirectory(langModel);\n        }\n        String fasttextModel = getOptionalProperty(props, \"fasttextModel\", null);\n        String fasttextBinary = getOptionalProperty(props, \"fasttextBinary\", null);\n        if (fasttextBinary != null && fasttextModel != null) {\n          setFasttextPaths(fasttextModel, fasttextBinary);\n        }\n        maxCheckThreads = Integer.parseInt(getOptionalProperty(props, \"maxCheckThreads\", \"10\"));\n        if (maxCheckThreads < 1) {\n          throw new IllegalArgumentException(\"Invalid value for maxCheckThreads, must be >= 1: \" + maxCheckThreads);\n        }\n        // default value 0 = use maxCheckThreads setting (for compatibility)\n        maxTextCheckerThreads = Integer.parseInt(getOptionalProperty(props, \"maxTextCheckerThreads\", \"0\"));\n        if (maxTextCheckerThreads < 0) {\n          throw new IllegalArgumentException(\"Invalid value for maxTextCheckerThreads, must be >= 1: \" + maxTextCheckerThreads);\n        }\n        textCheckerQueueSize = Integer.parseInt(getOptionalProperty(props, \"textCheckerQueueSize\", \"8\"));\n        if (textCheckerQueueSize < 0) {\n          throw new IllegalArgumentException(\"Invalid value for textCheckerQueueSize, must be >= 1: \" + textCheckerQueueSize);\n        }\n\n        boolean atdMode = getOptionalProperty(props, \"mode\", \"LanguageTool\").equalsIgnoreCase(\"AfterTheDeadline\");\n        if (atdMode) {\n          throw new IllegalArgumentException(\"The AfterTheDeadline mode is not supported anymore in LanguageTool 3.8 or later\");\n        }\n        String rulesConfigFilePath = getOptionalProperty(props, \"rulesFile\", null);\n        if (rulesConfigFilePath != null) {\n          rulesConfigFile = new File(rulesConfigFilePath);\n          if (!rulesConfigFile.exists() || !rulesConfigFile.isFile()) {\n            throw new RuntimeException(\"Rules Configuration file cannot be found: \" + rulesConfigFile);\n          }\n        }\n        String remoteRulesConfigFilePath = getOptionalProperty(props, \"remoteRulesFile\", null);\n        if (remoteRulesConfigFilePath != null) {\n          remoteRulesConfigFile = new File(remoteRulesConfigFilePath);\n          if (!remoteRulesConfigFile.exists() || !remoteRulesConfigFile.isFile()) {\n            throw new RuntimeException(\"Remote rules configuration file cannot be found: \" + remoteRulesConfigFile);","sourceCodeStart":355,"sourceCodeEnd":391,"githubUrl":"https://github.com/languagetool-org/languagetool/blob/2e990059ce67d5e2a0f7f7ca5d31160c6709df4b/languagetool-server/src/main/java/org/languagetool/server/HTTPServerConfig.java#L355-L391","documentation":"Configuration validation in HTTPServerConfig: the textCheckerQueueSize property parsed from server properties is < 1, which would allow no queue at all for text checking.","triggerScenarios":"Setting 'textCheckerQueueSize' to a negative integer in the properties file.","commonSituations":"Sign typos when tuning backpressure settings; generated configs with invalid defaults; misreading the (inconsistent) error message and avoiding the valid value 0.","solutions":["Set textCheckerQueueSize to 0 or a positive integer in the properties file","Remove the property to use the default of 8","Tune together with maxTextCheckerThreads to match expected load"],"exampleFix":"# before\ntextCheckerQueueSize=-8\n# after\ntextCheckerQueueSize=16","handlingStrategy":"validation","validationCode":"int q = Integer.parseInt(props.getProperty(\"textCheckerQueueSize\", \"8\"));\nif (q < 0) throw new IllegalArgumentException(\"textCheckerQueueSize must be >= 0, got \" + q);","typeGuard":null,"tryCatchPattern":"try { cfg = new HTTPServerConfig(props, args); } catch (IllegalArgumentException e) {\n  if (e.getMessage().contains(\"textCheckerQueueSize\")) { props.setProperty(\"textCheckerQueueSize\", \"8\"); cfg = new HTTPServerConfig(props, args); } else throw e;\n}","preventionTips":["Validate all queue-size properties together (queue + thread bounds)","Avoid negative sentinels in config; use absence for defaults","Align monitoring alerts with the configured queue size"],"tags":["configuration","validation","queue","java"],"backgroundTag":"invalid-config-value","analyzedSha":"2e990059ce67d5e2a0f7f7ca5d31160c6709df4b","analyzedAt":"2026-09-06T09:20:17.015Z","contentChangedAt":"2026-09-06T09:20:17.015Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}