Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache not found #418

Closed
2 tasks done
lanrekkeeg opened this issue Mar 5, 2024 · 2 comments
Closed
2 tasks done

Cache not found #418

lanrekkeeg opened this issue Mar 5, 2024 · 2 comments
Labels
bug Something is broken.

Comments

@lanrekkeeg
Copy link

Describe the issue

I am using Weblate with 2 replicas and a single volume (RWX). The volume is mounted on the default /app/data.

The cache folder is located at /app/cache/static/, and this folder is not part of the volume mount.

The problem is that I see 2 different cache files on each instance in /app/cache/static/CACHE/css. When a request is received randomly with a cache ID from a random instance, if it hits the right instance, it is fine. If not, it breaks the HTML page.

Shouldn't we mount app instead of /app/data so that the cache is available from both instances?

Replica one cache:

weblate@weblate-78f56f5d97-xz4hn:/app/cache/static/CACHE/css$ ls
output.5ceb8afe40df.css  output.dd5ad699a41d.css

Replica two cache:

weblate@weblate-78f56f5d97-ln4rh:/app/cache/static/CACHE/css$ ls
output.369cd91ac6fb.css  output.ca9306dee418.css

On replica one, this is the error message in the log when the request comes:

nginx stderr | 2024/03/05 10:21:50 [error] 267#267: *126612 open() "/app/cache/static/CACHE/css/output.369cd91ac6fb.css" failed (2: No such file or directory), client: 10.42.3.186, server: , request: "GET /static/CACHE/css/output.369cd91ac6fb.css HTTP/1.1", host: "----", referrer: "----"

If you see the error message, the cache file output.369cd91ac6fb.css is available on instance 2.

P.S. I am not sure how Weblate in the browser selects which cache to use and how this cache is generated.

I already tried

  • I've read and searched the documentation.
  • I've searched for similar filed issues in this repository.

Steps to reproduce the behavior

  1. Create a Helm deployment with 2 replicas and a single volume mounted on /app/data.
  2. Utilize external Redis and PostgreSQL.
  3. Weblate version is 4.16.4-1.
  4. PostgreSQL version is 15.
  5. The rest of the configuration is default in the Helm chart.

Expected behavior

No response

Screenshots

No response

Exception traceback

No response

Additional context

No response

@nijel nijel added the bug Something is broken. label Mar 5, 2024
@nijel
Copy link
Member

nijel commented Mar 5, 2024

Upgrade Weblate, this has been fixed some time ago: WeblateOrg/weblate@b555de8

@nijel nijel closed this as completed Mar 5, 2024
Copy link

github-actions bot commented Mar 5, 2024

Thank you for your report; the issue you have reported has just been fixed.

  • In case you see a problem with the fix, please comment on this issue.
  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken.
Projects
None yet
Development

No branches or pull requests

2 participants