{"record":{"id":"5ab64a28f0cff557","repo":"alibaba/nacos","slug":"invalid-per-task-config-size-expected-value-type","errorCode":null,"errorMessage":"invalid PER_TASK_CONFIG_SIZE, expected value type double","messagePattern":"invalid PER_TASK_CONFIG_SIZE, expected value type double","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"critical","filePath":"client/src/main/java/com/alibaba/nacos/client/utils/ParamUtil.java","lineNumber":96,"sourceCode":"        try {\n            tmp = NacosClientProperties.PROTOTYPE.getProperty(NACOS_READ_TIMEOUT_KEY,\n                DEFAULT_NACOS_READ_TIMEOUT);\n            return Integer.parseInt(tmp);\n        } catch (NumberFormatException e) {\n            final String msg = \"[http-client] invalid read timeout:\" + tmp;\n            LOGGER.error(\"[settings] \" + msg, e);\n            throw new IllegalArgumentException(msg, e);\n        }\n    }\n    \n    private static double initPerTaskConfigSize() {\n        try {\n            return Double.parseDouble(\n                NacosClientProperties.PROTOTYPE.getProperty(PER_TASK_CONFIG_SIZE_KEY,\n                    DEFAULT_PER_TASK_CONFIG_SIZE_KEY));\n        } catch (NumberFormatException e) {\n            LOGGER.error(\"[PER_TASK_CONFIG_SIZE] PER_TASK_CONFIG_SIZE invalid\", e);\n            throw new IllegalArgumentException(\n                \"invalid PER_TASK_CONFIG_SIZE, expected value type double\", e);\n        }\n    }\n    \n    public static int getConnectTimeout() {\n        return connectTimeout;\n    }\n    \n    public static void setConnectTimeout(int connectTimeout) {\n        ParamUtil.connectTimeout = connectTimeout;\n    }\n    \n    public static int getReadTimeout() {\n        return readTimeout;\n    }\n    \n    public static void setReadTimeout(int readTimeout) {\n        ParamUtil.readTimeout = readTimeout;","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/alibaba/nacos/blob/9b989acdf181d00898f2e8839257bb2b2a3cefe3/client/src/main/java/com/alibaba/nacos/client/utils/ParamUtil.java#L78-L114","documentation":"Thrown by ParamUtil.initPerTaskConfigSize() during static class initialization when the PER_TASK_CONFIG_SIZE property cannot be parsed as a double via Double.parseDouble. The default value is \"3000\". Like other ParamUtil static init errors, this surfaces as ExceptionInInitializerError and blocks the entire Nacos client from loading.","triggerScenarios":"Setting -DPER_TASK_CONFIG_SIZE to a non-numeric string (e.g. \"large\", \"3.0.0\", \"3,000\"). This property controls the max config payload size processed per single task in the config client.","commonSituations":"Operators mis-type the property name or value in JVM args or environment variables; locale issues where a comma is used as the decimal separator; values copied from documentation that include units or labels.","solutions":["Locate the offending PER_TASK_CONFIG_SIZE value from the exception message embedded in the ExceptionInInitializerError.","Check JVM system properties, environment variables, and nacos-client.properties for PER_TASK_CONFIG_SIZE.","Change the value to a valid decimal number (e.g. 3000 or 3000.0).","Ensure no locale-dependent comma separators are used; use a period as the decimal point."],"exampleFix":"// before\nSystem.setProperty(\"PER_TASK_CONFIG_SIZE\", \"3,000\");\n\n// after\nSystem.setProperty(\"PER_TASK_CONFIG_SIZE\", \"3000\");","handlingStrategy":"validation","validationCode":"String rawSize = System.getProperty(\"PER_TASK_CONFIG_SIZE\", \"3000\");\ntry {\n    Double.parseDouble(rawSize);\n} catch (NumberFormatException e) {\n    throw new IllegalStateException(\"PER_TASK_CONFIG_SIZE must be a double, got: \" + rawSize, e);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate PER_TASK_CONFIG_SIZE at startup before the Nacos client class-loads ParamUtil.","Ensure locale-independent decimal formatting (use period, not comma).","Centralize Nacos property configuration in one validated configuration class."],"tags":["configuration","client-init","static-initializer","config-client"],"backgroundTag":null,"analyzedSha":"9b989acdf181d00898f2e8839257bb2b2a3cefe3","analyzedAt":"2026-08-14T07:17:31.569Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}