Skip to content

fix: size max_threads auto from the memory limit of the container, not of the host - #2878

Open
nicolas-grekas wants to merge 1 commit into
php:mainfrom
nicolas-grekas:max-threads-memory-limit
Open

nicolas-grekas wants to merge 1 commit into
php:mainfrom
nicolas-grekas:max-threads-memory-limit

Conversation

@nicolas-grekas

Copy link
Copy Markdown
Contributor

In a container, sysinfo reports the memory of the host: max_threads auto then lets a container of a few hundred MB on a big host run hundreds of threads, enough to get it killed under load.

auto now uses the memory limit of Go when it's lower than the system's. Caddy derives it from the cgroup of the container, and GOMEMLIMIT sets it where the container doesn't expose one, as on Platform.sh and Upsun.

…t of the host

In a container, sysinfo reports the memory of the host: max_threads auto
then allowed hundreds of threads to a container of a few hundred MB. The
memory limit of Go caps it now when lower, which Caddy derives from the
cgroup of the container, and GOMEMLIMIT sets when the container doesn't
expose one.

This branch has not been deployed

No deployments
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.

1 participant