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

Allow max_connections to be set in RedisSettings #406

Merged
merged 4 commits into from
Apr 1, 2024

Conversation

danbox
Copy link
Contributor

@danbox danbox commented Jun 8, 2023

Default settings for Redis is an "unbounded" (i.e. 2**31) connection pool.

This means that misuse of the client can lead to the consumption of every available connection in Redis locking out additional clients and there is no way in arq to modify that setting without monkey patching or rolling your own create_pool function. This PR exposes a setting for connection pool size.

Allowing setting max_connections allows for a safeguard to preemptively thwart workers that are running amuck with client creation.

@codecov
Copy link

codecov bot commented Jun 8, 2023

Codecov Report

Merging #406 (c14d19a) into main (94cd878) will increase coverage by 2.10%.
Report is 4 commits behind head on main.
The diff coverage is 100.00%.

❗ Current head c14d19a differs from pull request most recent head 8678b5e. Consider uploading reports for the commit 8678b5e to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #406      +/-   ##
==========================================
+ Coverage   96.27%   98.38%   +2.10%     
==========================================
  Files          11       22      +11     
  Lines        1074     2106    +1032     
  Branches      209      364     +155     
==========================================
+ Hits         1034     2072    +1038     
+ Misses         19       14       -5     
+ Partials       21       20       -1     
Files Coverage Δ
arq/connections.py 95.23% <100.00%> (+5.17%) ⬆️

... and 14 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

@samuelcolvin samuelcolvin merged commit 9731f54 into python-arq:main Apr 1, 2024
11 checks passed
@samuelcolvin
Copy link
Member

thanks so much.

@samuelcolvin
Copy link
Member

v0.26.0b1 is released, please try it, I'll release v0.26 at the end of the week, see #441.

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