General updates and clean up.
This commit is contained in:
@@ -22,9 +22,9 @@ wsgi_app = "app.main:app"
|
||||
# default_proc_name = "app.main:app"
|
||||
|
||||
# Setting a long timeout since some FastAPI API requests may take a while
|
||||
timeout = 1200 # default 30; worker process silent then kill and restart
|
||||
graceful_timeout = 20 # default 30; timeout after restart signal
|
||||
keepalive = 300 # default 2; setting higher because behind load balancer (nginx)
|
||||
timeout = 2100 # default 30; 1200 is NOT enough; worker process silent then kill and restart
|
||||
graceful_timeout = 10 # default 30; timeout after restart signal
|
||||
keepalive = 2 # default 2; setting higher because behind load balancer (nginx)
|
||||
|
||||
# Reload does not work correctly with UvicornWorker
|
||||
# https://github.com/benoitc/gunicorn/issues/2339
|
||||
@@ -37,7 +37,7 @@ worker_class = "uvicorn.workers.UvicornWorker" # default "sync"
|
||||
# Works are processes, not threads
|
||||
# workers = 9 # default 1; use 10ish for production; 2 to 4 times the number of cores
|
||||
# threads = 1 # default 1; only affects Gthread worker type
|
||||
workers = os.getenv('AE_API_WORKERS', None)
|
||||
threads = os.getenv('AE_API_THREADS', None)
|
||||
workers = os.getenv('AE_API_WORKERS', 2)
|
||||
threads = os.getenv('AE_API_THREADS', 2)
|
||||
|
||||
# umask = '007'
|
||||
|
||||
Reference in New Issue
Block a user