Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 127.0.0.1 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? php.net/manual/en/… –  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

1 Answer 1

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: http://trac.nginx.org/nginx/browser/nginx/trunk/src/core/ngx_log.h#L67

#define NGX_MAX_ERROR_STR   2048

Increase it to what suites your needs.

share|improve this answer

Your Answer

 
discard

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.