'Truncated PHP-FPM / NGINX log lines
I have a lot of lines in my PHP-FPM / NGINX logs that are truncated to 2048 bytes like this:
2022/05/15 16:06:16 [error] 899#899: *29892 FastCGI sent in stderr: "com/wordpress/wp-includes/class-wp-query.php on line 4121PHP message: PHP Warning: Attempt to read property "post_title" on null in /var/www/ultimatehackingkeyboard.com/wordpress/wp-includes/class-wp-qu
ery.php on line 4123PHP message: PHP Warning: Attempt to read property "post_name" on null in /var/www/ultimatehackingkeyboard.com/wordpress/wp-includes/class-wp-query.php on line 4125PHP message: PHP Warning: Attempt to read property "ID" on null in /var/www/ultimateha
ckingkeyboard.com/wordpress/wp-includes/class-wp-query.php on line 4121PHP message: PHP Warning: Attempt to read property "post_title" on null in /var/www/ultimatehackingkeyboard.com/wordpress/wp-includes/class-wp-query.php on line 4123PHP message: PHP Warning: Attempt
to read property "post_name" on null in /var/www/ultimatehackingkeyboard.com/wordpress/wp-includes/class-wp-query.php on line 4125PHP message: PHP Warning: Attempt to read property "ID" on null in /var/www/ultimatehackingkeyboard.com/wordpress/wp-includes/class-wp-query.
php on line 4121PHP message: PHP Warning: Attempt to read property "post_title" on null in /var/www/ultimatehackingkeyboard.com/wordpress/wp-includes/class-wp-query.php on line 4123PHP message: PHP Warning: Attempt to read property "post_name" on null in /var/www/ultima
tehackingkeyboard.com/wordpress/wp-includes/class-wp-query.php on line 4125PHP message: PHP Warning: Attempt to read property "ID" on null in /var/www/ultimatehackingkeyboard.com/wordpress/wp-includes/class-wp-query.php on line 4121PHP message: PHP Warning: Attempt to r
ead property "post_title" on null in /var/www/ultimatehackingkeyboard.com/wordpress/wp-includes/class-wp-query.php on line 4123PHP message: PHP Warning: Attempt to read property "post_name" on null in /var/www/ultimatehackingkeyboard.com/wordpress/wp-includes/class-wp-qu
ery.php on line 4125PHP message: PHP Warning: Attempt to read property "ID" on null in /var/www/ultimatehackingkeyboard.com/wordpress/wp-inclu
I've read many similar issues, and some people suggest recompiling NGINX, but I can't believe there's no other solution.
I've set the following options, which, to my knowledge, should solve the issue, but they don't:
log_errors_max_len = 8000in/etc/php/8.0/fpm/php.ini.log_limit = 8000in/etc/php/8.0/fpm/php-fpm.conf.decorate_workers_output = noin/etc/php/8.0/fpm/pool.d/www.conf
Solution 1:[1]
The limit of 1024 characters is hard-coded in php-fpm not nginx.
If you want to go over 2048 characters you need to re-compiled both nginx and php-fpm, else only php-fpm.
There is a full solution with patches here for 8192 characters: https://forums.freebsd.org/threads/56543/
Solution 2:[2]
You can send error logs to stdout and log there with additional software.
www.conf
php_admin_value[error_log] = /dev/stdout
catch_workers_output = yes
Solution 3:[3]
Please read the documentation. https://frappeframework.com/docs/v13/user/en/guides/basics/contribute_translations
May be this documentation solve your problem.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Weber |
| Solution 2 | gud3 |
| Solution 3 | Samsul |
