ComfyUI stops working when using always active workers
Hi. I know it's strange, but here it is. I have a workflow that works flawlessly when using serverless workers that are NOT always active. That is, if I set "always active" to 0 and max workers to 1 or 2 and it all works fine.
For deployment, I put 1 worker as always active and 3 max workers. With this setup, (and exactly the same code as before), things stop working. The ComfyUI server starts but it looks like the endpoint never receives a request.
If I set It back to set 0 always active workers, it works again.
Any idea what it could be and how can I debug it?
I am using this as a template
https://github.com/blib-la/runpod-worker-comfy
With the difference that I baked in the docker image all the models and custom node. I am still using the rp_handler.py script in that repo though.
GitHub
GitHub - blib-la/runpod-worker-comfy: ComfyUI as a serverless API o...
ComfyUI as a serverless API on RunPod. Contribute to blib-la/runpod-worker-comfy development by creating an account on GitHub.
1 Reply
Have you tried using the refresh setting? https://docs.runpod.io/serverless/workers/handlers/handler-additional-controls#refresh-worker
Additional controls | RunPod Documentation
Send progress updates during job execution using the runpod.serverless.progress_update function, and refresh workers for long-running or complex jobs by returning a dictionary with a 'refresh_worker' flag in your handler.