Skip to content

Commit 695c65f

Browse files
committed
Fix max_input_time
762fd8c turned off nginx's request buffering, causing the input from the brwoser to be feed to PHP straight away, without the nginx webserver saving it to a temporary file first. Raise PHP's max_input_time to prevent timeouts (resulting in a 502 "Bad gateway" page being served to the user) if the upload takes too long.
1 parent 4a27fde commit 695c65f

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
cmprovision4 (1.2) UNRELEASED; urgency=medium
2+
3+
* php-fpm: fix maximum_input_time to accomodate large/slow uploads
4+
5+
-- Floris Bos <[email protected]> Wed, 17 Nov 2021 20:00:36 +0100
6+
17
cmprovision4 (1.1) UNRELEASED; urgency=medium
28

39
* nginx: turn off request buffering

debian/postinst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ case "$1" in
3636
PHP_INI=`echo "<?php echo str_replace('cli', 'fpm', php_ini_loaded_file() );" | php`
3737
sed -i "s/upload_max_filesize = 2M/upload_max_filesize = 8G/" "$PHP_INI"
3838
sed -i "s/post_max_size = 8M/post_max_size = 8G/" "$PHP_INI"
39+
sed -i "s/max_input_time = 60/max_input_time = 86400/" "$PHP_INI"
3940
deb-systemd-invoke restart php${PHP_VERSION}-fpm || true
4041

4142
# Enable site in nginx

0 commit comments

Comments
 (0)