mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-23 08:10:30 -05:00
- Slow down log frequency of write wait failures.
This commit is contained in:
parent
eb3378396f
commit
2450b4653a
2 changed files with 17 additions and 4 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
1 September 2022: Wouter
|
1 September 2022: Wouter
|
||||||
- Fix to update config tests to fix checking if nonblocking sockets
|
- Fix to update config tests to fix checking if nonblocking sockets
|
||||||
work on OpenBSD.
|
work on OpenBSD.
|
||||||
|
- Slow down log frequency of write wait failures.
|
||||||
|
|
||||||
31 August 2022: Wouter
|
31 August 2022: Wouter
|
||||||
- Fix to avoid process wide fcntl calls mixed with nonblocking
|
- Fix to avoid process wide fcntl calls mixed with nonblocking
|
||||||
|
|
|
||||||
|
|
@ -140,6 +140,8 @@ struct internal_base {
|
||||||
int slow_accept_enabled;
|
int slow_accept_enabled;
|
||||||
/** last log time for slow logging of file descriptor errors */
|
/** last log time for slow logging of file descriptor errors */
|
||||||
time_t last_slow_log;
|
time_t last_slow_log;
|
||||||
|
/** last log time for slow logging of write wait failures */
|
||||||
|
time_t last_writewait_log;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -416,8 +418,13 @@ comm_point_send_udp_msg(struct comm_point *c, sldns_buffer* packet,
|
||||||
# endif
|
# endif
|
||||||
if(pret == 0) {
|
if(pret == 0) {
|
||||||
/* timer expired */
|
/* timer expired */
|
||||||
verbose(VERB_OPS, "send udp blocked "
|
struct comm_base* b = c->ev->base;
|
||||||
"for long, dropping packet.");
|
if(b->eb->last_writewait_log+SLOW_LOG_TIME <=
|
||||||
|
b->eb->secs) {
|
||||||
|
b->eb->last_writewait_log = b->eb->secs;
|
||||||
|
verbose(VERB_OPS, "send udp blocked "
|
||||||
|
"for long, dropping packet.");
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
} else if(pret < 0 &&
|
} else if(pret < 0 &&
|
||||||
#ifndef USE_WINSOCK
|
#ifndef USE_WINSOCK
|
||||||
|
|
@ -652,8 +659,13 @@ comm_point_send_udp_msg_if(struct comm_point *c, sldns_buffer* packet,
|
||||||
# endif
|
# endif
|
||||||
if(pret == 0) {
|
if(pret == 0) {
|
||||||
/* timer expired */
|
/* timer expired */
|
||||||
verbose(VERB_OPS, "send udp blocked "
|
struct comm_base* b = c->ev->base;
|
||||||
"for long, dropping packet.");
|
if(b->eb->last_writewait_log+SLOW_LOG_TIME <=
|
||||||
|
b->eb->secs) {
|
||||||
|
b->eb->last_writewait_log = b->eb->secs;
|
||||||
|
verbose(VERB_OPS, "send udp blocked "
|
||||||
|
"for long, dropping packet.");
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
} else if(pret < 0 &&
|
} else if(pret < 0 &&
|
||||||
#ifndef USE_WINSOCK
|
#ifndef USE_WINSOCK
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue