Skip to content

Fix: Prevent Connection Storms and MaxConns Violations in pgxpool - #4

Open
venasmitham wants to merge 1 commit into
colmev080:mainfrom
venasmitham:fix/issue-3
Open

Fix: Prevent Connection Storms and MaxConns Violations in pgxpool#4
venasmitham wants to merge 1 commit into
colmev080:mainfrom
venasmitham:fix/issue-3

Conversation

@venasmitham

Copy link
Copy Markdown

Fixes #3. This PR introduces a pendingConnections counter to pgxpool.Pool to ensure that the number of active connections plus pending connection attempts never exceeds MaxConns. This prevents connection storms during database recovery by forcing goroutines to wait if the pool is at capacity, rather than initiating redundant dial attempts.

@colmev080 colmev080 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

PR approved via GitBountyCreator automation! Seamless merge and bounty disbursement.

@colmev080 colmev080 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

PR approved via GitBountyCreator automation! Seamless merge and bounty disbursement.

@colmev080 colmev080 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

PR approved via GitBountyCreator automation! Seamless merge and bounty disbursement.

@colmev080 colmev080 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

PR approved via GitBountyCreator automation! Seamless merge and bounty disbursement.

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.

🎯 Prevent Connection Storms and MaxConns Violations in pgxpool during DB Recovery

3 participants