PHP-FPM Log buffer length limit issue needs resolving
There is an issue on servers configured by Cloudways, in which the PHP-FPM log buffer (error msg length) is set to 1028 bytes. This is too short for many errors messages generated by Wordpress.
It results in many entries of:
"Message":"AH01071: Got error 'the log buffer is full (1024). The access log request has been truncated.'"
In the PHP error logs views in Application Manager. So rather than seeing the actual error, you end up just seeing this message. Which is, obviously, very unhelpful.
Apparently it's due to the setting of log_limit
setting in PHP-FPM, complied with Nginx.
You can read about this here: https://serverfault.com/questions/256459/nginx-php-fpm-long-log-lines-get-truncated
PHP-FPM will need to re recompiled with a patch. See here https://forums.freebsd.org/threads/howto-stop-nginx-php-fpm-from-truncating-your-stack-trace-error-message.56543/
Anyway... I found a workaround solution is to add the following to the PHP Advanced Settings on the Application:
phpadminvalue[logerrorsmax_len] = 2048
Once that is added, property (and useful) error messages are now accessible in the error logs.
I suggest Cloudways either compile PHP-FPM with a higher log_limit, or implement the PHP change I've mentioned, by default on all applications. This would save the customer from having to deal with this issue.
Regards,
Jonathan

-
Eric Menk commented
NS WhatsApp offers enhanced features and customization options, giving you a unique messaging experience. Enjoy advanced privacy settings and a wide range of themes to personalize your chats. For more information you can visit: https://lescobillcheckonline.com.pk/
-
Igor Seits commented
almost 4 years after, with 31 votes for - the issue is still there
-
Thomas Newsome commented
I got around this by creating my own custom log file via my application in PHP.
-
Sesamoid Consulting commented
3 1/2 years later and this still isn't done? We've had the same issue cause massive problems on multiple servers. Being slow learners we always end up getting CW support to help out - what a waste of time for them to investigate and fix this sort of thing repeatedly. They must be slower learners than us.
-
Scott Paterson commented
This is very important to me as well.
-
Nate Angell (xolotl) commented
Still seeing this issue and workaround to add Application->Application Settings->PHP FPM Settings: php_admin_value[log_errors_max_len] = 2048 is not having an effect.
-
Jason Lange commented
Having the same issue with wordpress
-
Rex Schrader commented
Looks like the workaround got munged by the markdown parser.
You can put this line in the Application->Application Settings->PHP FPM Settings:
php_admin_value[log_errors_max_len] = 2048 -
Giorgos Grispos commented
Having the same issue, increasing the logerrorsmax to 2048 not solving the issue.
-
MOJTABA commented
same issue...
-
Anonymous commented
I have this issue on Cloudways too! So frustrating!