Skip to content

Commit

Permalink
increase some values in nginx and php-fpm configs
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasCARPi committed Feb 12, 2021
1 parent 877dc0c commit 78213ff
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Container image version
# Note: the version here is from Dockerfile:ELABIMG_VERSION not the tagged one

# 2.3.1
* Fix configuration option PHP_MAX_CHILDREN not taken into account
* Increase number of server threads for php-fpm
* Increase fastcgi_read_timeout in nginx config

# 2.3.0
* Use s6-overlay instead of supervisor to launch services

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ FROM alpine:3.12
ENV ELABFTW_VERSION next

# this is versioning for the container image
ENV ELABIMG_VERSION 2.3.0
ENV ELABIMG_VERSION 2.3.1

ENV S6_OVERLAY_VERSION 2.1.0.2

Expand Down
2 changes: 2 additions & 0 deletions src/nginx/common.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ index index.php;
# fix 502 error "upstream sent too big header"
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
# fix 504 errors "timeout"
fastcgi_read_timeout 600s;

# custom error pages
error_page 400 /error-pages/400.html;
Expand Down
4 changes: 4 additions & 0 deletions src/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ phpfpmConf() {
sed -i -e "s/group = nobody/group = ${elabftw_group}/g" /etc/php7/php-fpm.d/www.conf
# increase max number of simultaneous requests
sed -i -e "s/pm.max_children = 5/pm.max_children = ${php_max_children}/g" /etc/php7/php-fpm.d/www.conf
# allow more idle server processes
sed -i -e "s/pm.start_servers = 2/pm.start_servers = 5/g" /etc/php7/php-fpm.d/www.conf
sed -i -e "s/pm.min_spare_servers = 1/pm.min_spare_servers = 4/g" /etc/php7/php-fpm.d/www.conf
sed -i -e "s/pm.max_spare_servers = 3/pm.max_spare_servers = 6/g" /etc/php7/php-fpm.d/www.conf
# allow using more memory
sed -i -e "s/;php_admin_value\[memory_limit\] = 32M/php_admin_value\[memory_limit\] = ${max_php_memory}/" /etc/php7/php-fpm.d/www.conf
# add container version in env
Expand Down

0 comments on commit 78213ff

Please sign in to comment.