Skip to content

Cache worker runs command OOM

When running cache_worker_runs in preprod, we get OOM killed relatively quickly

Screenshot from 2024-01-31 13-14-54.png

As the has_results_expression is relatively optimized, the issue may come from the all() queryset that tries to bulk update all the worker runs at once.

You could simply try to iterate on a small chunk to see the memory footprint decrease (and probably the time needed increase)