Has anyone run into this situation before concerning Redis memory > max memory
and the Open edX platform pages get really slow and are unusable?
We’ve run into this issue before concerning Redis. At the moment, we’re using AWS ElasticCache Redis service. We’ve reached memory > maxmemory
. Any suggestions on how to resolve this? Guess that we’ll need to increase our memory or restart the Redis service to fix this.
Does anyone have documentation on best ways to handle setting items that go into the Redis cache to live for so long?
Increasing memory will be considerably more expensive for us on AWS.
We are currently at 3 GB of memory for Redis but considering going to 6 GB.
We’re using a cache.t4g.medium…2 cores and 3.09 gib ram.
In the past restarting Redis helps clear out this memory issue. What issues would we have if we did that? Restarting the primary cluster node seems to help a lot.
CRITICAL/MainProcess] Unrecoverable error: ResponseError(“OOM command not allowed when used memory > ‘maxmemory’.“)
tutor_local-cms-1 | [pid: 7|app: 0|req: 410/2073] 172.18.0.9 () {58 vars in 2310 bytes} [Mon Apr 15 20:13:19 2024] GET /export_status/course-v1:REVVED+EV-ST-IEV+DEVELOPMENT => generated 23 bytes in 129 msecs (HTTP/1.1 200) 7 headers in 499 bytes (1 switches on core 0)
tutor_local-cms-worker-1 | [2024-04-15 20:13:19,819: CRITICAL/MainProcess] Unrecoverable error: ResponseError(“OOM command not allowed when used memory > ‘maxmemory’.“)
tutor_local-cms-worker-1 | Traceback (most recent call last):
tutor_local-cms-worker-1 | File “/openedx/venv/lib/python3.8/site-packages/celery/worker/worker.py”, line 208, in start
tutor_local-cms-worker-1 | self.blueprint.start(self)
tutor_local-cms-worker-1 | File “/openedx/venv/lib/python3.8/site-packages/celery/bootsteps.py”, line 119, in start
tutor_local-cms-worker-1 | step.start(parent)
tutor_local-cms-worker-1 | File “/openedx/venv/lib/python3.8/site-packages/celery/bootsteps.py”, line 369, in start
tutor_local-cms-worker-1 | return self.obj.start()
tutor_local-cms-worker-1 | File “/openedx/venv/lib/python3.8/site-packages/celery/worker/consumer/consumer.py”, line 318, in start
tutor_local-cms-worker-1 | blueprint.start(self)
tutor_local-cms-worker-1 | File “/openedx/venv/lib/python3.8/site-packages/celery/bootsteps.py”, line 119, in start
tutor_local-cms-worker-1 | step.start(parent)
tutor_local-cms-worker-1 | File “/openedx/venv/lib/python3.8/site-packages/celery/worker/consumer/connection.py”, line 23, in start
tutor_local-cms-worker-1 | c.connection = c.connect()
tutor_local-cms-worker-1 | File “/openedx/venv/lib/python3.8/site-packages/celery/worker/consumer/consumer.py”, line 407, in connect
tutor_local-cms-worker-1 | conn.transport.register_with_event_loop(conn.connection, self.hub)
tutor_local-cms-worker-1 | File “/openedx/venv/lib/python3.8/site-packages/kombu/transport/redis.py”, line 1057, in register_with_event_loop
tutor_local-cms-worker-1 | cycle.on_poll_init(loop.poller)
tutor_local-cms-worker-1 | File “/openedx/venv/lib/python3.8/site-packages/kombu/transport/redis.py”, line 331, in on_poll_init
tutor_local-cms-worker-1 | return channel.qos.restore_visible(
tutor_local-cms-worker-1 | File “/openedx/venv/lib/python3.8/site-packages/kombu/transport/redis.py”, line 196, in restore_visible
tutor_local-cms-worker-1 | with Mutex(client, self.unacked_mutex_key,
tutor_local-cms-worker-1 | File “/opt/pyenv/versions/3.8.12/lib/python3.8/contextlib.py”, line 113, in _enter_
tutor_local-cms-worker-1 | return next(self.gen)
tutor_local-cms-worker-1 | File “/openedx/venv/lib/python3.8/site-packages/kombu/transport/redis.py”, line 117, in Mutex
tutor_local-cms-worker-1 | lock_acquired = lock.acquire(blocking=False)
tutor_local-cms-worker-1 | File “/openedx/venv/lib/python3.8/site-packages/redis/lock.py”, line 187, in acquire
tutor_local-cms-worker-1 | if self.do_acquire(token):
tutor_local-cms-worker-1 | File “/openedx/venv/lib/python3.8/site-packages/redis/lock.py”, line 203, in do_acquire
tutor_local-cms-worker-1 | if self.redis.set(self.name, token, nx=True, px=timeout):
tutor_local-cms-worker-1 | File “/openedx/venv/lib/python3.8/site-packages/redis/client.py”, line 1801, in set
tutor_local-cms-worker-1 | return self.execute_command(‘SET’, *pieces)
tutor_local-cms-worker-1 | File “/openedx/venv/lib/python3.8/site-packages/redis/client.py”, line 901, in execute_command
tutor_local-cms-worker-1 | return self.parse_response(conn, command_name, **options)
tutor_local-cms-worker-1 | File “/openedx/venv/lib/python3.8/site-packages/redis/client.py”, line 915, in parse_response
tutor_local-cms-worker-1 | response = connection.read_response()
tutor_local-cms-worker-1 | File “/openedx/venv/lib/python3.8/site-packages/redis/connection.py”, line 756, in read_response
tutor_local-cms-worker-1 | raise response
tutor_local-cms-worker-1 | redis.exceptions.ResponseError: OOM command not allowed when used memory > ‘maxmemory’.
cc @dave