Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 have nginx+php-fpm on a server and the messages get truncated at 2048 chars, rendering the message quite unhelpful when a stack trace is logged : I can't see the following fields anymore:

  • host (not interesting)
  • upstream (not interesting)
  • request (very very interesting)
  • server (not interesting)
  • client (not interesting, always because of our architecture)

How do you overcome this problem? Do you change the format? Or did you find a way to overcome this stupid 2048 chars limitation which I hear is hardcoded? Or to disable this backtrace?

share|improve this question
Have you tried increasing error max length?… – Fleshgrinder Sep 5 '12 at 19:00
Yes, I tried that, I set it to 4096 chars in /etc/php5/fpm/php.ini, but nginx still truncates to 2048 chars – greg0ire Sep 6 '12 at 7:55

It’s really hardcoded, you would have to edit the source file and compile nginx yourself. Have a look at the following file from the nginx source repository:

#define NGX_MAX_ERROR_STR   2048

Increase it to what suites your needs.

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.