Skip to content
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

feat: allow configuration of mpm prefork in apache + mod_php #111

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .env.docker
Original file line number Diff line number Diff line change
Expand Up @@ -1264,6 +1264,46 @@ DOCKER_APP_HOST_CACHE_PATH="${DOCKER_ALL_HOST_DATA_ROOT_PATH:?error}/pixelfed/ca
# @see https://www.php.net/manual/en/install.fpm.configuration.php#pm.max-spare-servers
#DOCKER_APP_PHP_FPM_PM_MAX_SPARE_SERVERS="3"

# The number of server processes to start
#
# Apache + PHP *ONLY*
#
# @default 5
# @see https://httpd.apache.org/docs/2.4/mod/mpm_common.html#startservers
#DOCKER_APP_PHP_PREFORK_START_SERVERS="5"

# The minimum number of server processes which are kept spare
#
# Apache + PHP *ONLY*
#
# @default 5
# @see https://httpd.apache.org/docs/2.4/mod/prefork.html#minspareservers
#DOCKER_APP_PHP_PREFORK_MIN_SPARE_SERVERS="5"

# The maximum number of server processes which are kept spare
#
# Apache + PHP *ONLY*
#
# @default 10
# @see https://httpd.apache.org/docs/2.4/mod/prefork.html#maxspareservers
#DOCKER_APP_PHP_PREFORK_MAX_SPARE_SERVERS="10"

# The maximum number of server processes allowed to start
#
# Apache + PHP *ONLY*
#
# @default 150
# @see https://httpd.apache.org/docs/2.4/mod/mpm_common.html#maxrequestworkers
#DOCKER_APP_PHP_PREFORK_MAX_REQUEST_WORKERS="150"

# The maximum number of requests a server process serves
#
# Apache + PHP *ONLY*
#
# @default 0
# @see https://httpd.apache.org/docs/2.4/mod/mpm_common.html#maxconnectionsperchild
#DOCKER_APP_PHP_PREFORK_MAX_CONNECTIONS_PER_CHILD="0"

################################################################################
# docker redis
################################################################################
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxRequestWorkers: maximum number of server processes allowed to start
# MaxConnectionsPerChild: maximum number of requests a server process serves

StartServers {{ getenv "DOCKER_APP_PHP_PREFORK_START_SERVERS" "5" }}
MinSpareServers {{ getenv "DOCKER_APP_PHP_PREFORK_MIN_SPARE_SERVERS" "5" }}
MaxSpareServers {{ getenv "DOCKER_APP_PHP_PREFORK_MAX_SPARE_SERVERS" "10" }}
MaxRequestWorkers {{ getenv "DOCKER_APP_PHP_PREFORK_MAX_REQUEST_WORKERS" "150" }}
MaxConnectionsPerChild {{ getenv "DOCKER_APP_PHP_PREFORK_MAX_CONNECTIONS_PER_CHILD" "0" }}
Loading