Mastering Nginx

(Ron) #1

Troubleshooting Techniques


We live in an imperfect world. Despite our best intentions and planning, sometimes


things don't turn out the way we had expected. We need to be able to step back and
take a look at what went wrong. When we cannot immediately see what is causing the


error, we need to be able to reach into a toolbox of techniques for helping us discover
the problem. This process of figuring out what went wrong and how to fix it is what


we call troubleshooting.


In this chapter, we will explore different techniques for troubleshooting NGINX:



  • Analyzing log files

  • Configuring advanced logging

  • Common configuration errors

  • Operating system limits

  • Performance problems

  • Using the Stub Status module


Analyzing log files


Before going into a prolonged debugging session trying to track down the cause of a


problem, it is usually helpful to first look at the log files. They will often provide the


clue we need to track down the error and correct it. The messages that appear in the
error_log can sometimes be a bit cryptic, however, so we will discuss the format of


the log entries and then take a look at a few examples to show you how to interpret
what they mean.

Free download pdf