Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to increase number of workers in Daphne with Django

Tags:

django

daphne

With gunicorn I can increase thenumber of workers using -w 17

command: gunicorn server.asgi:application --bind 0.0.0.0:8000 -w 17 -k uvicorn.workers.UvicornWorker

How can I do that with daphne to utilize the CPU available?

command: daphne server.asgi:application --port 8000 --bind 0.0.0.0
like image 674
Joseph Adam Avatar asked Oct 23 '25 06:10

Joseph Adam


1 Answers

Daphne does not offer the possibility to increase the number of workers, but you can use supervisor with Daphne to configure the number of processes.

like image 185
florianvazelle Avatar answered Oct 25 '25 22:10

florianvazelle



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!