From 0f9873bed4f3cae5de32d88db2d43030d62cab4e Mon Sep 17 00:00:00 2001 From: Joey Schulze Date: Sat, 27 Sep 2003 23:29:02 +0000 Subject: [PATCH] On heavily loaded systems, some which are probably receiving a lot of syslog traffic through the network, there's a (not well researched) problem with receiving messages on the syslog UDP port. For some reason recvfrom() results in EAGAIN. See http://bugs.debian.org/188194 and http://www.ussg.iu.edu/hypermail/linux/kernel/0209.1/0218.html --- syslogd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/syslogd.c b/syslogd.c index 4c2014f..de1254d 100644 --- a/syslogd.c +++ b/syslogd.c @@ -1141,13 +1141,13 @@ int main(argc, argv) */ printchopped(from, line, \ i + 2, finet); - } else if (i < 0 && errno != EINTR) { + } else if (i < 0 && errno != EINTR && errno != EAGAIN) { dprintf("INET socket error: %d = %s.\n", \ errno, strerror(errno)); logerror("recvfrom inet"); /* should be harmless now that we set * BSDCOMPAT on the socket */ - sleep(10); + sleep(1); } } #endif