dbcache and multiple gunicorn workers

This commit is contained in:
David Kennedy 2024-03-06 07:07:00 -05:00
parent a4568a89ba
commit d1a1992ced
No known key found for this signature in database
GPG key ID: 6528A5386E66B96B
2 changed files with 7 additions and 6 deletions

View file

@ -192,11 +192,12 @@ WSGI_APPLICATION = "registrar.config.wsgi.application"
# For a low to medium traffic site, caching causes more
# problems than it solves. Should caching be desired,
# a reasonable start might be:
# CACHES = {
# "default": {
# "BACKEND": "django.core.cache.backends.db.DatabaseCache",
# }
# }
CACHES = {
"default": {
"BACKEND": "django.core.cache.backends.db.DatabaseCache",
"LOCATION": "cache_table",
}
}
# Absolute path to the directory where `collectstatic`
# will place static files for deployment.

View file

@ -6,4 +6,4 @@ set -o pipefail
# Make sure that django's `collectstatic` has been run locally before pushing up to any environment,
# so that the styles and static assets to show up correctly on any environment.
gunicorn --worker-class=gevent registrar.config.wsgi -t 60
gunicorn --workers=3 --worker-class=gevent registrar.config.wsgi -t 60