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 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.
NGINX uses a couple of different logging functions that produce the error_log
entries. The formats used with these functions take on the following patterns:
<timestamp> [log-level] <master/worker pid>#0: message
Consider the following example:
2012/10/14 18:56:41 [notice] 2761#0: using inherited sockets from "6;"
This is an example of informational messages (log level notice
). In this case, an nginx
binary has replaced a previously-running one, and was able to successfully inherit the old binary...