On Wed, 2005-06-15 at 11:35 +1200, Jason Haar wrote:
Hi there
I just reinstalled my Fedora workstation recently and hadn't moved over to syslog-ng like I normally do - so this is a question about syslog really.
In the past two days I've come in to find my workstation fairly screwed up by the syslog daemon being hung/broken. It would be running, but not working any more.
Anyway, as the socket file /dev/log exists, all apps that write to syslog were also hung! So I had my mail server screwed, cronjobs unable to finish, etc, etc. Simply stopping the syslog daemon caused my load average to jump to 40+ whilst all the pent-up processes started working again :-) I guess once the socket file disappeared under them, they just carried on nicely...
So - am I right in saying /dev/log blocks, and is there some way at an application layer to limit how long a process attempts to write to syslog before giving up? I know an alarm around the syslog call should work - but is that the only way?
Basically, this is how it was designed to work. The syslog() call in libc uses a blocking call to send messages to syslogd, if the socket is opened (e.g. syslogd is running) then there's no timeout involved. -- Bazsi