comparison src/core/ngx_connection.h @ 9225:1c9264603adc

Syslog: introduced ngx_syslog_send() error logging moderation. Errors when logging to syslog are now logged at most once per second. This ensures that persistent errors won't flood other logs, and spontaneous errors, such as ENOBUFS as observed on BSD systems when syslogd cannot cope with load, or EAGAIN as seen in similar situation on Linux, won't further overload logging subsystem, leading to more errors. Further, errors now can only trigger reconnects at most once per second. This ensures that persistent errors, which cannot be fixed with reconnects, don't trigger too much unneeded work. Additionally, in case of connection errors, such as when syslogd is not running, connection attempts are only made once per second.
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 01 Mar 2024 05:42:12 +0300
parents 58afcd72446f
children 2706b60dc225
comparison
equal deleted inserted replaced
9224:c7c8354f99fa 9225:1c9264603adc
96 NGX_ERROR_ALERT = 0, 96 NGX_ERROR_ALERT = 0,
97 NGX_ERROR_ERR, 97 NGX_ERROR_ERR,
98 NGX_ERROR_INFO, 98 NGX_ERROR_INFO,
99 NGX_ERROR_IGNORE_ECONNRESET, 99 NGX_ERROR_IGNORE_ECONNRESET,
100 NGX_ERROR_IGNORE_EINVAL, 100 NGX_ERROR_IGNORE_EINVAL,
101 NGX_ERROR_IGNORE_EMSGSIZE 101 NGX_ERROR_IGNORE_EMSGSIZE,
102 NGX_ERROR_DEBUG
102 } ngx_connection_log_error_e; 103 } ngx_connection_log_error_e;
103 104
104 105
105 typedef enum { 106 typedef enum {
106 NGX_TCP_NODELAY_UNSET = 0, 107 NGX_TCP_NODELAY_UNSET = 0,