You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/configuration.rst
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -140,10 +140,10 @@ This defines the default version that will be pulled from all Open edX git repos
140
140
141
141
This defines the version that will be pulled from just the Open edX platform git repositories. You may also override this configuration parameter at build time, by providing a ``--build-arg`` option.
By default, there are 2 `uwsgi worker processes <https://uwsgi-docs.readthedocs.io/en/latest/Options.html#processes>`__ to serve requests for the LMS and the CMS. However, each worker requires upwards of 500 Mb of RAM. You should reduce this value to 1 if your computer/server does not have enough memory.
146
+
By default, there are 2 Granian worker processes to serve requests for the LMS and the CMS. You should reduce this value to 1 if your computer/server does not have enough memory. You can increase it when you need higher throughput, as long as CPU and memory resources are available.
Copy file name to clipboardExpand all lines: docs/local.rst
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -206,9 +206,9 @@ To update the course search index, run::
206
206
Reloading Open edX settings
207
207
~~~~~~~~~~~~~~~~~~~~~~~~~~~
208
208
209
-
After modifying Open edX settings, for instance when running ``tutor config save``, you will want to restart the web processes of the LMS and the CMS to take into account those new settings. It is possible to simply restart the whole platform (with ``tutor local reboot``) or just a single service (``tutor local restart lms``) but that is overkill. A quicker alternative is to send the HUP signal to the uwsgi processes running inside the containers. The "openedx" Docker image comes with a convenient script that does just that. To run it, execute::
209
+
After modifying Open edX settings, for instance when running ``tutor config save``, you will want to restart the web processes of the LMS and the CMS to take into account those new settings. It is possible to simply restart the whole platform (with ``tutor local reboot``) or just a single service (``tutor local restart lms``) but that is overkill. A quicker alternative is to restart just the web server process running inside the containers. This can be done by updating a file in the granian's "--reload-paths" config. The "openedx" Docker image comes with a convenient script that does just that. To run it, execute::
Implement this patch to override hard-coded Redis configuration values. See the `Redis configuration reference <https://redis.io/docs/management/config-file/>`__`.
392
392
393
-
``uwsgi-config``
393
+
``granian-config``
394
394
================
395
395
396
-
File: ``apps/openedx/settings/uwsgi.ini``
396
+
File: ``apps/openedx/settings/granian-config``
397
397
398
-
A .INI formatted file used to extend or override the uWSGI configuration.
398
+
A file used to extend or override the Granian configuration.
399
399
400
-
Check the uWSGI documentation for more details about the `.INI format <https://uwsgi-docs.readthedocs.io/en/latest/Configuration.html#ini-files>`__ and the `list of available options <https://uwsgi-docs.readthedocs.io/en/latest/Options.html>`__.
400
+
Check the Granian documentation for the `list of available options <https://github.com/emmett-framework/granian>`__.
Copy file name to clipboardExpand all lines: docs/tutorials/proxy.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ Quite often, there is already a web proxy running on the host, and this web prox
11
11
12
12
With these changes, Tutor will no longer listen to ports 80 and 443 on the host. In this configuration, the Caddy container will only listen to port 81 on the host. Web requests will follow this path::
In this setup, the Caddy HTTP port (81) will be exposed to the world. Make sure to configure your server firewall to block unwanted connections to the Caddy container. Alternatively, you can configure the Caddy container to accept only local connections::
Copy file name to clipboardExpand all lines: docs/tutorials/scale.rst
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,11 +23,11 @@ Fortunately, Open edX was designed to run at scale -- most notably at `edX.org <
23
23
Increasing web server capacity
24
24
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
25
25
26
-
As the server CPU and memory are increased, the request throughput can be increased by adjusting the number of uWSGI workers (see :ref:`configuration docs <openedx_configuration>`). By default, the "lms" and "cms" containers each spawn 2 uWSGI workers. The number of workers should be increased if you observe an increase in the latency of user requests but CPU usage remains below 100%. To increase the number of workers for the LMS and the CMS, run for example::
26
+
As the server CPU and memory are increased, the request throughput can be increased by adjusting the number of Granian workers (see :ref:`configuration docs <openedx_configuration>`). By default, the "lms" and "cms" containers each spawn 2 Granian workers. The number of workers should be increased if you observe an increase in the latency of user requests but CPU usage remains below 100%. To increase the number of workers for the LMS and the CMS, run for example::
27
27
28
28
tutor config save \
29
-
--set OPENEDX_LMS_UWSGI_WORKERS=8 \
30
-
--set OPENEDX_CMS_UWSGI_WORKERS=4
29
+
--set OPENEDX_LMS_GRANIAN_WORKERS=8 \
30
+
--set OPENEDX_CMS_GRANIAN_WORKERS=4
31
31
tutor local restart lms cms
32
32
33
33
The right values will very much depend on your server's available memory and CPU performance, as well as the maximum number of simultaneous users who use your platform. As an example data point, it was reported that a large Open edX platform can serve up to 500k unique users per week on a virtual server with 8 vCPU and 16 GB memory.
0 commit comments