{"record":{"id":"32888b094595aa08","repo":"pinpoint-apm/pinpoint","slug":"agentinfosendintervalms-must-be-greater-than-0","errorCode":null,"errorMessage":"agentInfoSendIntervalMs must be greater than 0","messagePattern":"agentInfoSendIntervalMs must be greater than 0","errorType":"validation","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/AgentInfoSender.java","lineNumber":250,"sourceCode":"        }\n\n        public Builder sendInterval(long sendIntervalMs) {\n            this.sendIntervalMs = sendIntervalMs;\n            return this;\n        }\n\n        public Builder maxTryPerAttempt(int maxTryCountPerAttempt) {\n            this.maxTryPerAttempt = maxTryCountPerAttempt;\n            return this;\n        }\n\n\n        public AgentInfoSender build() {\n            if (this.refreshIntervalMs <= 0) {\n                throw new IllegalStateException(\"agentInfoRefreshIntervalMs must be greater than 0\");\n            }\n            if (this.sendIntervalMs <= 0) {\n                throw new IllegalStateException(\"agentInfoSendIntervalMs must be greater than 0\");\n            }\n            if (this.maxTryPerAttempt <= 0) {\n                throw new IllegalStateException(\"maxTryPerAttempt must be greater than 0\");\n            }\n            return new AgentInfoSender(this);\n        }\n    }\n}","sourceCodeStart":232,"sourceCodeEnd":258,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/AgentInfoSender.java#L232-L258","documentation":"Builder validation in AgentInfoSender.Builder.build: sendIntervalMs was configured as <= 0 (default 0 when Builder.sendInterval was never called or given a non-positive value), so the periodic agent-info sender cannot schedule sends and construction is rejected.","triggerScenarios":"Building AgentInfoSender after calling setAgentInfoSendIntervalMs(0 or negative); usually from profiler.agentInfoSendIntervalMs being zero/negative in the configuration.","commonSituations":"Misconfigured profiler.agentInfoSendIntervalMs in pinpoint.config; programmatic builder misuse in tests; unit mistakes entering seconds where ms expected.","solutions":["Call Builder.sendInterval with a positive millisecond value before build()","Check pinpoint.agent.info.send.interval configuration for a zero/negative setting"],"exampleFix":"// before\nbuilder.setAgentInfoSendIntervalMs(-1).build(); // throws\n// after\nbuilder.setAgentInfoSendIntervalMs(5000).build();","handlingStrategy":"validation","validationCode":"if (sendIntervalMs <= 0) {\n    throw new IllegalArgumentException(\"agentInfoSendIntervalMs must be > 0\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    sender = builder.setAgentInfoSendIntervalMs(cfg).build();\n} catch (IllegalStateException e) {\n    logger.warn(\"bad sendIntervalMs, falling back to default\", e);\n    sender = builder.setAgentInfoSendIntervalMs(5000).build();\n}","preventionTips":["Validate profiler.agentInfoSendIntervalMs > 0 at startup","Beware seconds-vs-milliseconds unit mistakes","Keep default values when the config entry is absent"],"tags":["config","validation","agent-info","startup"],"backgroundTag":"invalid-config-value","analyzedSha":"744c3d3075e595656abb1ae331ad2c0e4c9eb996","analyzedAt":"2026-09-07T18:48:45.289Z","contentChangedAt":"2026-09-07T18:48:45.289Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}