There is a hard-coded length limitation on the error messages in the Nginx core. It is 2048 bytes at most, including the trailing newlines and the leading timestamps. You can manually modify this limit by modifying the NGX_MAX_ERROR_STR macro definition in the src/core/ngx_log.h file in the Nginx source tree. If the message size exceeds this limit, the Nginx core will truncate the message text automatically.
Fixed bug #69031 (Long messages into stdout/stderr are truncated incorrectly) - added new log related FPM configuration options: log_limit, log_buffering and decorate_workers_output.
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/
You need to recompile Nginx if you want log lines longer than 2048 bytes. From http://wiki.nginx.org/HttpLuaModule:
I believe you need to have a look at
From here
I recommend using php 7.3
From https://www.php.net/ChangeLog-7.php :
Open
/etc/php-fpm.conf
and update the value oflog_limit = 4096
or higher if you like, thensystemctl restart php-fpm
.