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

We have big nginx error log(1GB).

Can this cause serious performance issue while nginx writes new errors in that file?

Sometimes our webserver hangs and recovers itself for about 2 minute.

OS: FreeBSD 8

share|improve this question
I would expect constant issues rather than intermittent ones. Have you tried truncating the log file (after backing it up) to see if the problem goes away? – ChrisF Apr 14 '12 at 22:37
Does nginx open file(read) then write into it? Because in this case, it will cause 2-3 minute heavy load. – Toktik Apr 14 '12 at 22:40
I don't know for certain, but truncating the log file would eliminate the size as being the issue. – ChrisF Apr 14 '12 at 22:40

I believe it depends on nginx implementation details. In theory if nginx internally only opens a log file for append, then I would not expect performance issues from the large size. I recommend has a general good practice to have a log management strategy in place. Truncating the log or other strategy may be used to mitigating the risk of degradation with disk fragmentation or running out of free space.

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.