WeblateOrg / docker

Official Docker container for Weblate, a libre software web-based continuous localization system
https://docs.weblate.org/en/latest/admin/install/docker.html
GNU General Public License v3.0
92 stars 106 forks source link

High Memory Usage Leading to OOM Error in Kubernetes Deployment of Weblate #2845

Open tonyzhu opened 5 days ago

tonyzhu commented 5 days ago

I am deploying Weblate using the Docker image weblate/weblate:5.8.4.0 on Kubernetes. The deployment is configured with the following resource limits:

CPU: 2 cores Memory: 7 GB I observed that the memory usage of the Weblate pod quickly rises above 90% and eventually crashes with an OOM (Out of Memory) error within a day. Here are the relevant environment variables configured:

Name:             WEBLATE_DEBUG
Value:            0
Name:             WEBLATE_WORKERS
Value:            16
Name:             WEB_WORKERS
Value:            4
Name:             RATELIMIT_LOCKOUT
Value:            180
Name:             RATELIMIT_ATTEMPTS
Value:            10

Observed Behavior:

The pod crashes with an OOM error after running for less than a day. Memory usage consistently stays above 90%.

Question:

Is there a potential memory leak in the program? Are there any recommended configuration changes to optimize memory usage for this setup? Additional Information: The container image was pulled from Docker Hub: weblate/weblate:5.8.4.0 Kubernetes resource limits:

Resources:
  Limits:
    Cpu:     2000m
    Memory:  7Gi

I already tried

Steps to reproduce the behavior

High Memory Usage Leading to OOM Error in Kubernetes Deployment of Weblate

Expected behavior

No response

Screenshots

No response

Exception traceback

No response

Additional context

No response

nijel commented 4 days ago

WEBLATE_WORKERS=16 is definitely too much for this system.

github-actions[bot] commented 4 days ago

This issue has been marked as a question by a Weblate team member. Why? Because it belongs more to the professional Weblate Care or community Discussions than here. We strive to answer these reasonably fast here, too, but purchasing the support subscription is more responsible and faster for your business. And it makes Weblate stronger as well. Thanks!

In case your question is already answered, making a donation is the right way to say thank you!