Skip to content

Document per-node, per-data-source scope of MaxOpenConns#9107

Open
mrckndt wants to merge 1 commit into
mattermost:masterfrom
mrckndt:improve-MaxOpenConns
Open

Document per-node, per-data-source scope of MaxOpenConns#9107
mrckndt wants to merge 1 commit into
mattermost:masterfrom
mrckndt:improve-MaxOpenConns

Conversation

@mrckndt

@mrckndt mrckndt commented Jul 20, 2026

Copy link
Copy Markdown
Member

Summary

Clarifies that MaxOpenConns is applied independently on each Mattermost server node, for the master database and for each configured read/search replica - not as cluster-wide limits. The docs previously said these settings apply "per data source" but never mentioned the additional multiplication by node count, which could lead to undersizing max_connections on the database.

…-wide sizing formula.

Clarifies that MaxOpenConns is applied independently on each Mattermost server node for the master database and each read/search replica - not as a cluster-wide limit.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@mrckndt
mrckndt requested review from roberson-io and vish9812 July 20, 2026 11:47
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The documentation clarifies that connection limits apply per data source and Mattermost server node, adds HA cluster sizing formulas and examples, and explains separate pools for each configured read or search replica.

Changes

Connection pool sizing

Layer / File(s) Summary
Per-node connection sizing guidance
source/administration-guide/configure/environment-configuration-settings.rst, source/administration-guide/scale/high-availability-cluster-based-deployment.rst
Documents MaxOpenConns and MaxIdleConns per data source and server node, with formulas and a three-node HA example.
Replica connection pool behavior
source/administration-guide/configure/environment-configuration-settings.rst
Explains that each configured read or search replica connection string creates its own pool on every Mattermost server node.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely summarizes the main change: per-node, per-data-source MaxOpenConns sizing.
Description check ✅ Passed The description is directly related to the documentation changes and matches the PR's intent.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@source/administration-guide/configure/environment-configuration-settings.rst`:
- Around line 816-825: Clarify the database connection-sizing guidance around
MaxOpenConns and the HA example to state that the calculated value is
Mattermost’s pool upper bound, not the database’s exact max_connections setting.
Instruct readers to reserve additional capacity for administrative sessions,
migrations, monitoring, and other non-Mattermost clients.

In
`@source/administration-guide/scale/high-availability-cluster-based-deployment.rst`:
- Around line 702-706: Clarify the max_connections sizing guidance around the
formula using the nearby MaxOpenConns example: identify the result as Mattermost
application connection demand, not the complete database or pooler limit.
Instruct administrators to add appropriate headroom for administration,
monitoring, replication, migrations, and other clients, and to size
pooler-facing limits separately.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7e5a832a-66cf-4ed5-8c54-c4d05a7c9934

📥 Commits

Reviewing files that changed from the base of the PR and between bbb48ba and 90bd3a5.

📒 Files selected for processing (2)
  • source/administration-guide/configure/environment-configuration-settings.rst
  • source/administration-guide/scale/high-availability-cluster-based-deployment.rst

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