Skip to content

Conversation

@Kvark1205
Copy link

Summary

  • Increased pid_limit to mattermost container which low value caused vary plugin crashes and unableing to use mmctl inside container

Commentary: In case of our mattermost server I can track by systemd-cgtop command that mattermost container using over 200 tasks. This low value on pid_limit caused vary plugins crashing accidentially and failing container healthcheck. This issues was very hard to investigate. I only discover this when I was needed to use mmctl and I was unable to run binary inside container with next error:

runtime/cgo: runtime/cgo: pthread_create failed: Resource temporarily unavailablepthread_create failed: Resource temporarily unavailable
  • Added memory limitation to mattermost container for preventing potential memory leaks

Commentary: This limitations were added to our mattermost server after several memory leaks during last year. Before upgrading to 7.1.3 several leaks was caused by mention 100+ users over @ALL command in channel, but this already fixed afaik. Recent leak that was on latest LTS 7.1.3 relase we ain't determined but we guessing it caused by playbooks plugin beacause of a lot of errors on consumtion memory peak.

Hope this information can help someone.

- Increased pid_limit to mattermost container which low value caused vary plugin crashes and unableing to use mmctl inside container
- Added memory limitation to mattermost container for preventing potential memory leaks
Comment on lines +34 to +37
pids_limit: 500
mem_reservation: 2G
mem_limit: 8G
memswap_limit: 2G
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we should enforce these limits by default. I'm fine with documenting them in the README, but a default limit seems too much. There are cases where more than 8G are needed, e.g. for large servers.

@hanzei hanzei added 2: Dev Review Requires review by a core committer Awaiting Submitter Action Blocked on the author labels Dec 17, 2024
@hanzei
Copy link
Contributor

hanzei commented Jul 22, 2025

/update-branch

@mattermost-build
Copy link

This PR has been automatically labelled "stale" because it hasn't had recent activity.
A core team member will check in on the status of the PR to help with questions.
Thank you for your contribution!

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

Labels

2: Dev Review Requires review by a core committer Awaiting Submitter Action Blocked on the author Lifecycle/1:stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants