-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Variables or at least better defaults for PHP pm.* settings #1982
Comments
Duplicate of #1969 |
I think this issue is not actually a real duplicate IMHO. Could not you e.g.:
|
There is some attempt in #1766 and #1964. We can't make any assumption about the host system. This may range from a tiny SOC board to a large root server and from single purpose hosts to one that shares it's resources with many other services. There is no "good" default or at least I'm not aware of a "good" way to calculate it. |
@J0WI I would assume that a docker host has at least 4 GB RAM and is dedicated for the Nextcloud stack. If this parameters can be changed for larger or smaller hosts by environment variables like the PHP memory and upload limit https://github.com/nextcloud/docker/blob/master/26/fpm-alpine/Dockerfile#L81 this should be a good solution. |
This is what I did: FROM nextcloud:${NEXTCLOUD_VERSION}-fpm-alpine
# ...
ENV PHP_PM_MAX_CHILDREN=5
ENV PHP_PM_START_SERVERS=2
ENV PHP_PM_MIN_SPARE_SERVERS=1
ENV PHP_PM_MAX_SPARE_SERVERS=3
RUN set -eux; \
{ \
echo '[www]'; \
echo 'pm.max_children = ${PHP_PM_MAX_CHILDREN}'; \
echo 'pm.start_servers = ${PHP_PM_START_SERVERS}'; \
echo 'pm.min_spare_servers = ${PHP_PM_MIN_SPARE_SERVERS}'; \
echo 'pm.max_spare_servers = ${PHP_PM_MAX_SPARE_SERVERS}'; \
} | tee "/usr/local/etc/php-fpm.d/zz-pm.conf" The defaults are those from |
@t3easy Thank you very mush! My problem (freeze when rewinding video) solved! |
The default values for
pm.max_children
pm.start_servers
pm.min_spare_servers
pm.max_spare_servers
are not usable in production in most Nextcloud installations.
In the new docs, there is a part that these settings should be changed depending on the available resources:
https://docs.nextcloud.com/server/26/admin_manual/installation/server_tuning.html#tune-php-fpm
Older docs had some example values:
https://docs.nextcloud.com/server/21/admin_manual/installation/server_tuning.html#tune-php-fpm
If these settings are not changed, the Nextcloud no longer responds when the load increases.
[pool www] server reached pm.max_children setting (5), consider raising it
The docker image should provide better defaults for PHP pm.* settings and environment variables to change them without building the image.
The text was updated successfully, but these errors were encountered: