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

Fix redis connection leakage #7631

Conversation

hiimdoublej-swag
Copy link

Note: Before submitting this pull request, please review our contributing
guidelines
.

Description

This PR is picked from #6985 since it has gone stale. (One of the maintainers asked for a rebase and that's all she wrote.)
This tries to resolve #6819 by ensuring there's only 1 redis connection pool across all the gevent concurrencies.

@auvipy auvipy added this to the 5.3 milestone Jul 14, 2022
@codecov
Copy link

codecov bot commented Jul 14, 2022

Codecov Report

Merging #7631 (8718c50) into master (aa9fd8a) will decrease coverage by 0.01%.
The diff coverage is 25.00%.

@@            Coverage Diff             @@
##           master    #7631      +/-   ##
==========================================
- Coverage   89.75%   89.74%   -0.02%     
==========================================
  Files         138      138              
  Lines       16996    17000       +4     
  Branches     2508     2509       +1     
==========================================
+ Hits        15255    15256       +1     
- Misses       1491     1493       +2     
- Partials      250      251       +1     
Flag Coverage Δ
unittests 89.72% <25.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
celery/app/base.py 95.92% <25.00%> (-0.53%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aa9fd8a...8718c50. Read the comment docs.

Copy link
Member

@auvipy auvipy left a comment

Choose a reason for hiding this comment

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

would you mind adding some test for this change?

@auvipy
Copy link
Member

auvipy commented Jul 14, 2022

redis integration tests are failing

@hiimdoublej-swag
Copy link
Author

redis integration tests are failing

I take a look, thanks

@hiimdoublej-swag
Copy link
Author

@auvipy How did you manage to run tests locally ? The build in /docker doesn't seem to work.
Complains about dependency conflicts.

@hiimdoublej-swag
Copy link
Author

Well, I managed to get the tests running, but I think this fix introduced another problem with threading.

@auvipy
Copy link
Member

auvipy commented Jul 19, 2022

yeah if you can fix that please push and let me know

@hiimdoublej-swag
Copy link
Author

It seemed to stuck on result retrieval under threaded environments, not sure why.

@hiimdoublej-swag
Copy link
Author

I'm starting to think that maybe this approach wasn't the correct fix, I'll close for now until I discover otherwise or found another fix.

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

Successfully merging this pull request may close these issues.

Redis result backend connections leak
2 participants