mirror of https://github.com/zulip/zulip.git
Use persistent connections to our database.
I figure we can start with 600s as a maximum age -- our threads do many dozens of requests per minute, so I figure we'll get most of the benefit of permanently persisting connections this way. I could also be convinced to do just 60s, though the impact will likely to be less visible on staging. 600s seems to be what Django originally had for this parameter before they disabled it by default. See: https://groups.google.com/forum/#!msg/django-developers/rH0QQP7tI6w/yBusiFTNBR4J for discussion, which also suggests we might have issues with runserver that we should watch out for. (imported from commit 0ae09fa4f1b39cc88c76fa58258aaf20ab168dcf)
This commit is contained in:
parent
d13500ac0d
commit
98ad49c866
|
@ -60,6 +60,7 @@ DATABASES = {"default": {
|
|||
'PASSWORD': '', # Authentication done via certificates
|
||||
'HOST': 'postgres.zulip.net',
|
||||
'SCHEMA': 'zulip',
|
||||
'CONN_MAX_AGE': 600,
|
||||
'OPTIONS': {
|
||||
'sslmode': 'verify-full',
|
||||
'autocommit': True,
|
||||
|
|
|
@ -41,6 +41,7 @@ CACHES['database'] = {
|
|||
'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
|
||||
'LOCATION': 'zulip-database-test-cache',
|
||||
'TIMEOUT': 3600,
|
||||
'CONN_MAX_AGE': 600,
|
||||
'OPTIONS': {
|
||||
'MAX_ENTRIES': 100000
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue