{"record":{"id":"7265e09c314f91d3","repo":"conductor-oss/conductor","slug":"conductor-app-sweeper-thread-count-must-be-greater","errorCode":null,"errorMessage":"conductor.app.sweeper-thread-count must be greater than 0.","messagePattern":"conductor\\.app\\.sweeper-thread-count must be greater than 0\\.","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"critical","filePath":"core/src/main/java/com/netflix/conductor/core/config/SchedulerConfiguration.java","lineNumber":59,"sourceCode":"     * @see com.netflix.conductor.core.events.queue.ConductorObservableQueue\n     */\n    @Bean\n    public Scheduler scheduler(ConductorProperties properties) {\n        ThreadFactory threadFactory =\n                new BasicThreadFactory.Builder()\n                        .namingPattern(\"event-queue-poll-scheduler-thread-%d\")\n                        .build();\n        Executor executorService =\n                Executors.newFixedThreadPool(\n                        properties.getEventQueueSchedulerPollThreadCount(), threadFactory);\n\n        return Schedulers.from(executorService);\n    }\n\n    @Bean(SWEEPER_EXECUTOR_NAME)\n    public Executor sweeperExecutor(ConductorProperties properties) {\n        if (properties.getSweeperThreadCount() <= 0) {\n            throw new IllegalStateException(\n                    \"conductor.app.sweeper-thread-count must be greater than 0.\");\n        }\n        ThreadFactory threadFactory =\n                new BasicThreadFactory.Builder().namingPattern(\"sweeper-thread-%d\").build();\n        return Executors.newFixedThreadPool(properties.getSweeperThreadCount(), threadFactory);\n    }\n\n    @Override\n    public void configureTasks(ScheduledTaskRegistrar taskRegistrar) {\n        ThreadPoolTaskScheduler threadPoolTaskScheduler = new ThreadPoolTaskScheduler();\n        threadPoolTaskScheduler.setPoolSize(3); // equal to the number of scheduled jobs\n        threadPoolTaskScheduler.setThreadNamePrefix(\"scheduled-task-pool-\");\n        threadPoolTaskScheduler.initialize();\n        taskRegistrar.setTaskScheduler(threadPoolTaskScheduler);\n    }\n}\n","sourceCodeStart":41,"sourceCodeEnd":76,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/core/src/main/java/com/netflix/conductor/core/config/SchedulerConfiguration.java#L41-L76","documentation":"Thrown by the sweeperExecutor @Bean in SchedulerConfiguration during Spring context startup. The sweeper is the background pool that periodically re-evaluates in-flight workflows (the decider queue). The bean refuses to be created when conductor.app.sweeper-thread-count is zero or negative, because a zero-size fixed thread pool cannot run anything and would silently stall all workflow progress.","triggerScenarios":"Setting the property conductor.app.sweeper-thread-count=0 (or a negative value) in application.properties / env, or passing it via -Dconductor.app.sweeper-thread-count=0. The guard is properties.getSweeperThreadCount() <= 0 inside the sweeperExecutor(ConductorProperties) bean method, which fires at bean wiring time before the app boots.","commonSituations":"Operator tries to disable the sweeper by setting the count to 0 (wrong approach). Migration from an older version where the property had a different key. An env-var override that resolves to an empty string is coerced to 0. Note the default is availableProcessors()*2, so this only fires when explicitly misconfigured.","solutions":["Set conductor.app.sweeper-thread-count to a positive integer (e.g. the default of availableProcessors()*2, or at minimum 1).","If the intent was to disable sweeping entirely rather than resize it, find the proper sweeper-enabled property for your version instead of zeroing the thread count.","Verify no env var or profile overrides the value to 0 (grep for sweeper-thread-count across all active property sources)."],"exampleFix":"// before\nconductor.app.sweeper-thread-count=0\n// after\nconductor.app.sweeper-thread-count=8","handlingStrategy":"validation","validationCode":"// Validate sweeper thread count before relying on the bean\nint count = properties.getSweeperThreadCount();\nif (count <= 0) {\n    throw new IllegalStateException(\n        \"conductor.app.sweeper-thread-count must be > 0; was \" + count);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat conductor.app.sweeper-thread-count as a required-positive property in your deployment manifests.","Add a startup config check / unit test that asserts the property resolves to >= 1 across all profiles.","Never set it to 0 to 'disable' sweeping — use the dedicated enabled flag instead."],"tags":["configuration","startup","thread-pool","sweeper"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}