Commit 36ab81ec by Feanil Patel Committed by Ned Batchelder

Be able to override the django sql CONN_MAX_AGE setting.

(cherry picked from commit 1c138599)
parent 5324a520
- Role: edxapp - Role: edxapp
- Added a new EDXAPP_MYSQL_CONN_MAX_AGE, default to 0. Adjust it to change how long a connection is kept open
for reuse before it is closed.
- Set preload_app to False in gunicorn config for LMS and Studio. - Set preload_app to False in gunicorn config for LMS and Studio.
- Role: xqueue - Role: xqueue
- Changed `XQUEUE_RABBITMQ_TLS` default from `true` to `false`. - Changed `XQUEUE_RABBITMQ_TLS` default from `true` to `false`.
......
...@@ -87,6 +87,9 @@ EDXAPP_MYSQL_CSMH_PASSWORD: "{{ EDXAPP_MYSQL_PASSWORD }}" ...@@ -87,6 +87,9 @@ EDXAPP_MYSQL_CSMH_PASSWORD: "{{ EDXAPP_MYSQL_PASSWORD }}"
EDXAPP_MYSQL_CSMH_HOST: "{{ EDXAPP_MYSQL_HOST }}" EDXAPP_MYSQL_CSMH_HOST: "{{ EDXAPP_MYSQL_HOST }}"
EDXAPP_MYSQL_CSMH_PORT: "{{ EDXAPP_MYSQL_PORT }}" EDXAPP_MYSQL_CSMH_PORT: "{{ EDXAPP_MYSQL_PORT }}"
# This is Django's default https://docs.djangoproject.com/en/1.8/ref/settings/#conn-max-age
EDXAPP_MYSQL_CONN_MAX_AGE: 0
EDXAPP_MYSQL_HOST: 'localhost' EDXAPP_MYSQL_HOST: 'localhost'
EDXAPP_MYSQL_PORT: '3306' EDXAPP_MYSQL_PORT: '3306'
...@@ -725,6 +728,7 @@ edxapp_databases: ...@@ -725,6 +728,7 @@ edxapp_databases:
PASSWORD: "{{ EDXAPP_MYSQL_REPLICA_PASSWORD }}" PASSWORD: "{{ EDXAPP_MYSQL_REPLICA_PASSWORD }}"
HOST: "{{ EDXAPP_MYSQL_REPLICA_HOST }}" HOST: "{{ EDXAPP_MYSQL_REPLICA_HOST }}"
PORT: "{{ EDXAPP_MYSQL_REPLICA_PORT }}" PORT: "{{ EDXAPP_MYSQL_REPLICA_PORT }}"
CONN_MAX_AGE: "{{ EDXAPP_MYSQL_CONN_MAX_AGE }}"
default: default:
ENGINE: 'django.db.backends.mysql' ENGINE: 'django.db.backends.mysql'
NAME: "{{ EDXAPP_MYSQL_DB_NAME }}" NAME: "{{ EDXAPP_MYSQL_DB_NAME }}"
...@@ -733,6 +737,7 @@ edxapp_databases: ...@@ -733,6 +737,7 @@ edxapp_databases:
HOST: "{{ EDXAPP_MYSQL_HOST }}" HOST: "{{ EDXAPP_MYSQL_HOST }}"
PORT: "{{ EDXAPP_MYSQL_PORT }}" PORT: "{{ EDXAPP_MYSQL_PORT }}"
ATOMIC_REQUESTS: True ATOMIC_REQUESTS: True
CONN_MAX_AGE: "{{ EDXAPP_MYSQL_CONN_MAX_AGE }}"
student_module_history: student_module_history:
ENGINE: 'django.db.backends.mysql' ENGINE: 'django.db.backends.mysql'
NAME: "{{ EDXAPP_MYSQL_CSMH_DB_NAME }}" NAME: "{{ EDXAPP_MYSQL_CSMH_DB_NAME }}"
...@@ -740,6 +745,7 @@ edxapp_databases: ...@@ -740,6 +745,7 @@ edxapp_databases:
PASSWORD: "{{ EDXAPP_MYSQL_CSMH_PASSWORD }}" PASSWORD: "{{ EDXAPP_MYSQL_CSMH_PASSWORD }}"
HOST: "{{ EDXAPP_MYSQL_CSMH_HOST }}" HOST: "{{ EDXAPP_MYSQL_CSMH_HOST }}"
PORT: "{{ EDXAPP_MYSQL_CSMH_PORT }}" PORT: "{{ EDXAPP_MYSQL_CSMH_PORT }}"
CONN_MAX_AGE: "{{ EDXAPP_MYSQL_CONN_MAX_AGE }}"
edxapp_generic_auth_config: &edxapp_generic_auth edxapp_generic_auth_config: &edxapp_generic_auth
EVENT_TRACKING_SEGMENTIO_EMIT_WHITELIST: "{{ EDXAPP_EVENT_TRACKING_SEGMENTIO_EMIT_WHITELIST }}" EVENT_TRACKING_SEGMENTIO_EMIT_WHITELIST: "{{ EDXAPP_EVENT_TRACKING_SEGMENTIO_EMIT_WHITELIST }}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment