Error: Zlib error -2 deflating data ((null))

Post Reply
User avatar
isscbta
Team Member
Posts: 130
Joined: Mon Jul 19, 2021 1:41 am
Has thanked: 15 times
Been thanked: 3 times

In the situation when you get this error:
[Wed Dec 28 23:40:24.920188 2022] [deflate:error] [pid 29944:tid 139922593777408] [client 12.12.12.12:52930] AH01386: Zlib error -2 deflating data ((null)), referer: https://www.domain.com/adm/login.php?ac ... =%2Fadm%2F
[Wed Dec 28 23:40:24.920196 2022] [proxy_fcgi:error] [pid 29944:tid 139922593777408] (20014)Internal error (specific information not available): [client 12.12.12.12s:52930] AH01075: Error dispatching request to : (passing brigade to output filters), referer: https://www.domain.com/adm/login.php?ac ... =%2Fadm%2F
This error typically indicates that the script is generating an excessive number of warnings, causing the error output buffer to stop functioning.

To prevent this, we will change the FPM pool.d conf file (/etc/php/X.X/fpm/pool.d/yourdomain.com.conf - viewtopic.php?f=18&t=54) and add this:

Code: Select all

php_admin_value[zlib.output_compression] = off
php_admin_value[zlib.output_compression_level] = -1
php_admin_value[zlib.output_handler] =
php_admin_value[error_reporting] = off
This will turn off any PHP error logging, so, please keep in mind that if you plan sometimes to see error logs again in the future, you will need to turn 'on' error_reporting in the pool.d conf file.

Also, make sure that these variables are set high enough, the following example is how high is enough:

Code: Select all

request_terminate_timeout = 360s
php_admin_value[max_execution_time] = 300
php_admin_value[memory_limit] = 512M
Restart FPM to apply new PHP settings.

Code: Select all

systemctl restart phpX.X-fpm

Tags:
Post Reply