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

external redis reconnect with nslookup #8138

Closed
2 tasks done
tolikkk opened this issue Sep 21, 2022 · 3 comments
Closed
2 tasks done

external redis reconnect with nslookup #8138

tolikkk opened this issue Sep 21, 2022 · 3 comments
Labels
question This is more a question for the support than an issue. wontfix Nobody will work on this.

Comments

@tolikkk
Copy link

tolikkk commented Sep 21, 2022

Describe the issue

Hello.

We use kubernetes weblate version 4.4.2-1 with external redis host. In our environment redis - is a cluster service with 2 nodes (master + slave). Master host is always known by a cluster DNS A-record, pointing to IP of current active RW redis node.

The problem we have - when redis host changes role master -> slave, weblate does no reconnect to new redis master. It seems weblate resolve REDIS_HOST IP while starting and use it's address further. Restarting weblate fix the problem - it resolves new redis host IP and works fine.

Errors in weblate logs:
uwsgi stderr | django_redis.exceptions.ConnectionInterrupted: Redis ReadOnlyError: You can't write against a read only replica.

Do you have any appropriate configuration option in weblate to reconnect + nslookup to redis if request fail? Or may be force doing lookup at any request?

I already tried

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

Steps to reproduce the behavior

  1. start weblate with external redis (REDIS_HOST = redis.example.com). redis.example.com = 192.168.0.2
  2. switch redis roles master <-> slave. redis.example.com = 192.168.0.3
  3. got weblate error "Redis ReadOnlyError: You can't write against a read only replica"

Expected behavior

weblate reconnect to new redis master host using the same REDIS_HOST = redis.example.com

Screenshots

No response

Exception traceback

No response

How do you run Weblate?

Docker container

Weblate versions

4.4.2-1

Weblate deploy checks

No response

Additional context

No response

@nijel
Copy link
Member

nijel commented Sep 22, 2022

It should be doable via Redis connection pool configuration, but I have no experience with that: https://github.com/jazzband/django-redis#connection-pools

@nijel nijel added the question This is more a question for the support than an issue. label Sep 22, 2022
@github-actions
Copy link

This issue looks more like a support question than an issue. We strive to answer these reasonably fast, but purchasing the support subscription is not only more responsible and faster for your business but also makes Weblate stronger.

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

@github-actions
Copy link

github-actions bot commented Oct 3, 2022

This issue has been automatically marked as stale because there wasn’t any recent activity.

It will be closed soon if no further action occurs.

Thank you for your contributions!

@github-actions github-actions bot added the wontfix Nobody will work on this. label Oct 3, 2022
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question This is more a question for the support than an issue. wontfix Nobody will work on this.
Projects
None yet
Development

No branches or pull requests

2 participants