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

Hotfix/v0.7 harden redis #2683

Merged
merged 2 commits into from
Oct 4, 2024
Merged

Hotfix/v0.7 harden redis #2683

merged 2 commits into from
Oct 4, 2024

Conversation

rkuo-danswer
Copy link
Contributor

Description

ports some redis reliability changes to release/0.7

How Has This Been Tested?

[Describe the tests you ran to verify your changes]

Accepted Risk

[Any know risks or failure modes to point out to reviewers]

Related Issue(s)

[If applicable, link to the issue(s) this PR addresses]

Checklist:

  • All of the automated tests pass
  • All PR comments are addressed and marked resolved
  • If there are migrations, they have been rebased to latest main
  • If there are new dependencies, they are added to the requirements
  • If there are new environment variables, they are added to all of the deployment methods
  • If there are new APIs that don't require auth, they are added to PUBLIC_ENDPOINT_SPECS
  • Docker images build and basic functionalities work
  • Author has done a final read through of the PR right before merge

Copy link

vercel bot commented Oct 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
internal-search ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 4, 2024 4:33pm

@rkuo-danswer rkuo-danswer marked this pull request as ready for review October 4, 2024 16:33
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This pull request enhances Redis reliability in the Danswer project, focusing on Celery configuration and Redis connection pool improvements.

  • Introduced BlockingConnectionPool in redis_pool.py for more deterministic behavior when max connections are reached
  • Added health checks, connection retries, and socket keepalive options in celeryconfig.py for improved Redis stability
  • Implemented platform-specific Redis socket keepalive options in constants.py for better connection persistence
  • Added new Redis and Celery configuration settings in app_configs.py, including CELERY_BROKER_POOL_LIMIT
  • Updated Docker Compose files to include the new CELERY_BROKER_POOL_LIMIT environment variable

6 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings

Comment on lines +214 to +217
if platform.system() == "Darwin":
REDIS_SOCKET_KEEPALIVE_OPTIONS[socket.TCP_KEEPALIVE] = 60 # type: ignore
else:
REDIS_SOCKET_KEEPALIVE_OPTIONS[socket.TCP_KEEPIDLE] = 60 # type: ignore
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Consider adding a more specific else condition for Linux systems, as the current else block might apply to Windows as well.

@Weves Weves merged commit 756385e into release/v0.7 Oct 4, 2024
6 checks passed
@rkuo-danswer rkuo-danswer deleted the hotfix/v0.7-harden-redis branch October 4, 2024 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants