Skip to content

Commit

Permalink
Set NGINX fastcgi_read_timeout with PHP_MAX_EXECUTION_TIME (Fixes #424)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaydrogers committed Oct 3, 2024
1 parent 0f578e7 commit 38d9736
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/s6/etc/entrypoint.d/10-init-webserver-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ process_template() {
fi

# Get all environment variables starting with 'NGINX_', 'SSL_', `LOG_`, and 'APACHE_'
subst_vars=$(env | grep -E '^(NGINX_|SSL_|LOG_|APACHE_)' | cut -d= -f1 | awk '{printf "${%s},",$1}' | sed 's/,$//')
subst_vars=$(env | grep -E '^(PHP_|NGINX_|SSL_|LOG_|APACHE_)' | cut -d= -f1 | awk '{printf "${%s},",$1}' | sed 's/,$//')

# Validate that all required variables are set
for var_name in $(echo "$subst_vars" | tr ',' ' '); do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ location ~ \.php$ {
include fastcgi_params;
fastcgi_buffers $NGINX_FASTCGI_BUFFERS;
fastcgi_buffer_size $NGINX_FASTCGI_BUFFER_SIZE;
fastcgi_read_timeout $PHP_MAX_EXECUTION_TIME;
}

# additional config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ location ~ \.php$ {
include fastcgi_params;
fastcgi_buffers $NGINX_FASTCGI_BUFFERS;
fastcgi_buffer_size $NGINX_FASTCGI_BUFFER_SIZE;
fastcgi_read_timeout $PHP_MAX_EXECUTION_TIME;
}

# additional config
Expand Down

0 comments on commit 38d9736

Please sign in to comment.