Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am unsure is that is a Nginx or PHP-FPM setting, but long log lines are getting truncated. Is there a setting to increase the max log line length?

share|improve this question

You need to recompile Nginx if you want log lines longer than 2048 bytes. From

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.

share|improve this answer
Recompiled with increased NGX_MAX_ERROR_STR. Did not help, same as before. – Benjamin Peter May 31 at 13:01

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:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.