Commit 30b924d5 by David Ormsbee

Disable app preload in gunicorn for LMS & Studio.

Since the earliest days of edX, we've run gunicorn with preload_app as
True. This was primarily because the first handful of courses were using
the XMLModuleStore, which was extremely slow to initialize because it
had to read entire courses from disk and load them into memory at
startup.

XMLModuleStore courses stopped being created with the introduction of
Studio, and we've long since removed them from edx.org. Note: This
should not be confused with importing courses that are authored in XML.
XMLModuleStore courses are courses who use the disk instead of Mongo
for content persistence, and require a server restart for content edits
to show.

This commit sets things back to how Django is more commonly deployed
with gunicorn. It will make server startup time somewhat more expensive
because each worker process does init work, but it should make it
easier to safely enable features like database connection pooling
without having to worry about shared resources.

[PERF-305]
parent a1179f28
- Role: edxapp
- Set preload_app to False in gunicorn config for LMS and Studio.
- Role: analytics_api
- Added `ANALYTICS_API_AGGREGATE_PAGE_SIZE`, default value 10. Adjust this parameter to increase the number of
aggregate search results returned by the Analytics API, i.e. in course_metadata: enrollment_modes, cohorts, and
......
......@@ -5,7 +5,7 @@ gunicorn configuration file: http://docs.gunicorn.org/en/develop/configure.html
"""
import multiprocessing
preload_app = True
preload_app = False
timeout = 300
bind = "{{ edxapp_cms_gunicorn_host }}:{{ edxapp_cms_gunicorn_port }}"
pythonpath = "{{ edxapp_code_dir }}"
......
......@@ -5,7 +5,7 @@ gunicorn configuration file: http://docs.gunicorn.org/en/develop/configure.html
"""
import multiprocessing
preload_app = True
preload_app = False
timeout = 300
bind = "{{ edxapp_lms_gunicorn_host }}:{{ edxapp_lms_gunicorn_port }}"
pythonpath = "{{ edxapp_code_dir }}"
......
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