mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-11-11 07:41:02 +00:00
Compare commits
2 Commits
f103f056cd
...
59b1987ff1
Author | SHA1 | Date | |
---|---|---|---|
|
59b1987ff1 | ||
|
208937d9d3 |
@ -0,0 +1,4 @@
|
|||||||
|
- 💥[Bugfix] Prevent infinite growth of course structure cache in Redis. (by @regisb)
|
||||||
|
- Redis is now configured with a maximum memory size of 4GB. If this is too low for your platform, you should increase this value using the new "redis-conf" patch.
|
||||||
|
- Make sure that course structure cache keys have an actual timeout.
|
||||||
|
- [Feature] Introduce the "redis-conf" patch. (by @regisb)
|
@ -376,6 +376,13 @@ File: ``apps/openedx/settings/lms/production.py``
|
|||||||
|
|
||||||
Python-formatted LMS settings in production. Values defined here override the values from :patch:`openedx-lms-common-settings`.
|
Python-formatted LMS settings in production. Values defined here override the values from :patch:`openedx-lms-common-settings`.
|
||||||
|
|
||||||
|
``redis-conf``
|
||||||
|
==============
|
||||||
|
|
||||||
|
File: ``apps/redis/redis.conf``
|
||||||
|
|
||||||
|
Implement this patch to override hard-coded Redis configuration values. See the `Redis configuration reference <https://redis.io/docs/management/config-file/>`__`.
|
||||||
|
|
||||||
``uwsgi-config``
|
``uwsgi-config``
|
||||||
================
|
================
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ click-log==0.4.0
|
|||||||
# via scriv
|
# via scriv
|
||||||
coverage==7.3.2
|
coverage==7.3.2
|
||||||
# via -r requirements/dev.in
|
# via -r requirements/dev.in
|
||||||
cryptography==41.0.7
|
cryptography==42.0.3
|
||||||
# via secretstorage
|
# via secretstorage
|
||||||
dill==0.3.7
|
dill==0.3.7
|
||||||
# via pylint
|
# via pylint
|
||||||
|
@ -73,7 +73,7 @@ CACHES = {
|
|||||||
},
|
},
|
||||||
"course_structure_cache": {
|
"course_structure_cache": {
|
||||||
"KEY_PREFIX": "course_structure",
|
"KEY_PREFIX": "course_structure",
|
||||||
"TIMEOUT": 7200,
|
"TIMEOUT": 604800, # 1 week
|
||||||
"BACKEND": "django_redis.cache.RedisCache",
|
"BACKEND": "django_redis.cache.RedisCache",
|
||||||
"LOCATION": "redis://{% if REDIS_USERNAME and REDIS_PASSWORD %}{{ REDIS_USERNAME }}:{{ REDIS_PASSWORD }}{% endif %}@{{ REDIS_HOST }}:{{ REDIS_PORT }}/{{ OPENEDX_CACHE_REDIS_DB }}",
|
"LOCATION": "redis://{% if REDIS_USERNAME and REDIS_PASSWORD %}{{ REDIS_USERNAME }}:{{ REDIS_PASSWORD }}{% endif %}@{{ REDIS_HOST }}:{{ REDIS_PORT }}/{{ OPENEDX_CACHE_REDIS_DB }}",
|
||||||
},
|
},
|
||||||
|
@ -39,3 +39,10 @@ auto-aof-rewrite-percentage 100
|
|||||||
auto-aof-rewrite-min-size 64mb
|
auto-aof-rewrite-min-size 64mb
|
||||||
aof-load-truncated yes
|
aof-load-truncated yes
|
||||||
aof-use-rdb-preamble yes
|
aof-use-rdb-preamble yes
|
||||||
|
|
||||||
|
############################## MEMORY MANAGEMENT ################################
|
||||||
|
|
||||||
|
maxmemory 4gb
|
||||||
|
maxmemory-policy allkeys-lru
|
||||||
|
|
||||||
|
{{ patch("redis-conf") }}
|
||||||
|
@ -51,6 +51,9 @@ RUN git config --global user.email "tutor@overhang.io" \
|
|||||||
{{ patch("openedx-dockerfile-git-patches-default") }}
|
{{ patch("openedx-dockerfile-git-patches-default") }}
|
||||||
{%- else %}
|
{%- else %}
|
||||||
# Patch edx-platform
|
# Patch edx-platform
|
||||||
|
# Prevent course structure cache infinite growth
|
||||||
|
# https://github.com/openedx/edx-platform/pull/34210
|
||||||
|
RUN curl -fsSL https://github.com/openedx/edx-platform/commit/ad201cd664b6c722cbefcbda23ae390c06daf621.patch | git am
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
{# Example: RUN curl -fsSL https://github.com/openedx/edx-platform/commit/<GITSHA1>.patch | git am #}
|
{# Example: RUN curl -fsSL https://github.com/openedx/edx-platform/commit/<GITSHA1>.patch | git am #}
|
||||||
|
Loading…
Reference in New Issue
Block a user