Skip to content

fix redis connection leaks + exclusions error: (fixes #1065) #1066

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

Merged
merged 2 commits into from
Aug 15, 2023

Conversation

ikreymer
Copy link
Member

  • use contextmanager for accessing redis to ensure redis.close() is always called
  • add get_redis_client() to k8sapi to ensure unified place to get redis client
  • use connectionpool.from_url() until redis 5.0.0 is released to ensure auto close and single client settings are applied
  • also: catch invalid regex passed to re.compile() in queue regex check, return 400 instead of 500 for invalid regex
  • redis requirements: bump to 5.0.0rc2

- use contextmanager for accessing redis to ensure redis.close() is always called
- add get_redis_client() to k8sapi to ensure unified place to get redis client
- use connectionpool.from_url() until redis 5.0.0 is released to ensure auto close and single client settings are applied
- also: catch invalid regex passed to re.compile() in queue regex check, return 400 instead of 500 for invalid regex
- redis requirements: bump to 5.0.0rc2
@Chickensoupwithrice Chickensoupwithrice self-requested a review August 14, 2023 17:16
Copy link
Contributor

@Chickensoupwithrice Chickensoupwithrice left a comment

Choose a reason for hiding this comment

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

Seems good, hopefully it'll fix the memory leak!

@ikreymer ikreymer merged commit 2e73148 into main Aug 15, 2023
@ikreymer ikreymer deleted the fix-redis-leak-and-exclusions-error branch August 15, 2023 01:29
ikreymer added a commit that referenced this pull request Aug 16, 2023
… connection leak in from_url(),

remove previous workaround
ikreymer added a commit that referenced this pull request Aug 16, 2023
… connection leak in from_url(), (#1081)

simplifies previous workaround addressed in 5.0.0
SuaYoo pushed a commit that referenced this pull request Aug 21, 2023
… connection leak in from_url(), (#1081)

simplifies previous workaround addressed in 5.0.0
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