make connection pool
This commit is contained in:
@ -91,7 +91,7 @@ WSGI_APPLICATION = 'config.wsgi.application'
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.contrib.gis.db.backends.postgis',
|
||||
'ENGINE': 'dj_db_conn_pool.backends.postgresql',
|
||||
'NAME': env("POSTGRES_DBNAME"),
|
||||
'USER': env("POSTGRES_USER"),
|
||||
'PASSWORD': env("POSTGRES_PASS"),
|
||||
@ -100,6 +100,15 @@ DATABASES = {
|
||||
}
|
||||
}
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'POOL_OPTIONS' : {
|
||||
'POOL_SIZE': 200,
|
||||
'MAX_OVERFLOW': 10,
|
||||
'RECYCLE': 24 * 60 * 60
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Password validation
|
||||
# https://docs.djangoproject.com/en/3.2/ref/settings/#auth-password-validators
|
||||
|
||||
Reference in New Issue
Block a user