Troubleshooting#

If you encounter a technical issue and couldn’t find the solution in other sections, ask us a question on the community forum or in the Telegram channel.

Technical support for clients:

Debug Logging#

The debug log should be enabled before performing self-diagnostics or as recommended by support.

To do this, run Angie PRO using the executable with debug logging enabled:

In the pre-built packages for Linux, the angie-debug file is built with debug logging enabled:

$ ls -l /usr/sbin/ | grep angie

   lrwxrwxrwx 1 root root      13 Sep 21 18:58 angie -> angie-nodebug
   -rwxr-xr-x 1 root root 1561224 Sep 21 18:58 angie-debug
   -rwxr-xr-x 1 root root 1426056 Sep 21 18:58 angie-nodebug

Configure running angie-debug:

$ sudo ln -fs angie-debug /usr/sbin/angie
$ sudo angie -t && sudo service angie upgrade

This will initiate a live executable upgrade.

To revert to the regular executable after debugging:

$ sudo ln -fs angie-nodebug /usr/sbin/angie
$ sudo angie -t && sudo service angie upgrade

Note

Using the executable with debug support enabled may slightly reduce performance; enabling the debug log can significantly reduce it and increase disk space usage.

To enable the debug log, set the debug level in the configuration using the error_log directive:

error_log /path/to/log debug;

And reload the configuration:

$ sudo angie -t && sudo service angie reload

Note

If you switch to the executable without debug support enabled but leave the debug level in the error_log directive, Angie PRO will log entries at the info level.

Overriding error_log in the configuration without specifying the debug level disables the debug log. Here, overriding the log at the server level disables debug logging for an individual server:

error_log /path/to/log debug;

http {
   server {
     error_log /path/to/log;
    # ...

To avoid this, remove the line that overrides error_log, or set the debug level in it:

error_log /path/to/log debug;

http {
   server {
     error_log /path/to/log debug;
   #  ...

Logging for Specific Addresses#

You can enable debug logging only for specified client addresses:

error_log /path/to/log;

events {
  debug_connection 192.168.1.1;
  debug_connection 192.168.10.0/24;
}

Cyclic Memory Buffer#

Debug log can be written to a cyclic memory buffer:

error_log memory:32m debug;

Writing to the memory buffer at the debug level will not significantly impact performance even under high load. In this case, the log can be extracted using a GDB script, for example:

set $log = ngx_cycle->log

while $log->writer != ngx_log_memory_writer
  set $log = $log->next
end

set $buf = (ngx_log_memory_buf_t *) $log->wdata
dump binary memory debug_log.txt $buf->start $buf->end