Conversation
Add mem_limit settings with documentation links to help users configure appropriate memory limits based on their deployment size. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
lieut-data
approved these changes
Jan 26, 2026
Contributor
Author
|
@isacikgoz Can you please review the PR while Marco is out? Thanks! |
isacikgoz
approved these changes
Feb 2, 2026
| pids_limit: 200 | ||
| # See https://docs.mattermost.com/administration-guide/scale/scaling-for-enterprise.html | ||
| # for guidance on memory limits based on your deployment size. | ||
| mem_limit: 4G |
Member
There was a problem hiding this comment.
This seemed to be a bit low to me, but it's okay for small instances.
Contributor
Author
There was a problem hiding this comment.
The docker install is meant for smaller instances and POCs. I think it's fine to keep the limit low.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace
pids_limitwithmem_limitfor postgres and mattermost services to prevent connection failures under normal load.Problem
A customer reported PostgreSQL connection failures caused by hitting the
pids_limit: 100constraint. PostgreSQL creates one process per database connection, meaning the database could only handle ~90-95 concurrent connections before exhausting the PID limit. This is too restrictive for production deployments with moderate traffic.Changes
pids_limit: 100, addedmem_limit: 16Gpids_limit: 200, addedmem_limit: 4GRationale
Memory limits provide better resource protection while allowing PostgreSQL to scale connections naturally based on actual load. The
pids_limitapproach was overly restrictive and caused operational issues in real-world scenarios.The default values chosen (16G/4G) are based on typical medium-sized deployment requirements and can be adjusted per the scaling documentation.
Documentation
Inline comments added referencing https://docs.mattermost.com/administration-guide/scale/scaling-for-enterprise.html