Last Updated: 2023-12-03
gunicorn mysite.asgi:application --pythonpath mysite --timeout 15 --max-requests 10000 --worker-class uvicorn.workers.UvicornWorker --bind unix:/tmp/asgi.sock
--max-requestsis a gunicorn config for a memory leak. It causes restart after that requests. If we do not have a memory leak, we will improve performance by removing this.
--timeoutcauses gunicorn to restart worker if it hasn't done work in X seconds. Default is 30s. Lower timeouts are better for high request volumes.
--bind- taking a unix socket for nginx here. But could be
0.0.0.0:8000for ip socket