]> jfr.im git - irc.git/blame - software/RELEASES/ircservices/achurch.org/services/lists/ircservices/2001/002639.html
rename -> *.git
[irc.git] / software / RELEASES / ircservices / achurch.org / services / lists / ircservices / 2001 / 002639.html
CommitLineData
3bd189cb
JR
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
2<HTML>
3 <HEAD>
4 <TITLE> [IRCServices] Log Rotation and -SIGUSR2
5 </TITLE>
6 <LINK REL="Index" HREF="index.html" >
7 <LINK REL="made" HREF="mailto:ircservices%40ircservices.za.net?Subject=%5BIRCServices%5D%20Log%20Rotation%20and%20-SIGUSR2&In-Reply-To=3c18b979.67513%40achurch.org">
8 <META NAME="robots" CONTENT="index,nofollow">
9 <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
10 <LINK REL="Previous" HREF="002637.html">
11 <LINK REL="Next" HREF="002638.html">
12 </HEAD>
13 <BODY BGCOLOR="#ffffff">
14 <H1>[IRCServices] Log Rotation and -SIGUSR2</H1>
15 <B>Mark Hetherington</B>
16 <A HREF="mailto:ircservices%40ircservices.za.net?Subject=%5BIRCServices%5D%20Log%20Rotation%20and%20-SIGUSR2&In-Reply-To=3c18b979.67513%40achurch.org"
17 TITLE="[IRCServices] Log Rotation and -SIGUSR2">mark at mhetherington.demon.co.uk
18 </A><BR>
19 <I>Fri Dec 14 03:15:03 PST 2001</I>
20 <P><UL>
21 <LI>Previous message: <A HREF="002637.html">[IRCServices] Version 5.0 alpha release available
22</A></li>
23 <LI>Next message: <A HREF="002638.html">[IRCServices] killclones
24</A></li>
25 <LI> <B>Messages sorted by:</B>
26 <a href="date.html#2639">[ date ]</a>
27 <a href="thread.html#2639">[ thread ]</a>
28 <a href="subject.html#2639">[ subject ]</a>
29 <a href="author.html#2639">[ author ]</a>
30 </LI>
31 </UL>
32 <HR>
33<!--beginarticle-->
34<PRE>I was not a subscriber to the list at the time the rotate_log() function was
35removed so missed the discussion. I haven't yet come across it in the
36archives. For these reasons, some of what I say here may have come up
37before.
38
39kill -SIGUSR2 combined with a move of the log file does not seem to be the
40best manner in which to manage the log rotation, at least IME. Quite often,
41the sequence will result in services performing an SQUIT with an error
42message of:
43
44Read error from server: Success
45
46to it's log file.
47
48So far I have been unable to discover the exact reason what services thinks
49is an error especially given the lack of error indicated with the error
50message.
51
52Various combinations of file operations and the SIGUSR signal have been
53tried with no noticable change.
54
55So far I have been unable through existing debug code been able to ascertain
56the exact cause of the problem however I suspect that it is a timing issue
57with services responding to the signal at the wrong point during the file
58system operations (maybe the file operation is still in progress, maybe file
59size has some effect on this).
60
61Since the problem is only semi-regularly reproducable on the production
62network, I am limited as to how often I can debug the problem and I suspect
63that I would be better placed merely rewriting the log/signal processing to
64use a system that would not suffer these problems. Sometimes services will
65run for a couple months without a problem then other times it will have the
66problem every day. Again this is not helpful for attempting to debug the
67cause.
68
69Having had a quick look at the source code for Services 5 alpha, it seems
70the SIGUSR2/logging code is almost identical so this will likely remain an
71issue with newer versions of services.
72
73Although I would be interested in hearing other's experience and techniques
74for managing log rotation, I do have a couple of suggestions that I believe
75would be useful to have in the main build of services:
76
771) Restore the original rotate_log() function or provide a new one - using a
78compile time #define would mean that those that do no want to have the code
79compiled in do not have to. Yes I can provide my own rotate_log() code, but
80with Services 5 coming up and the likely need for more frequent upgrades in
81the early days, I would prefer not to have to keep patching the log code.
82
832) Alter the log naming convention so that it becomes LogFileName.suffix
84where suffix is generated from the current date. eg 20011213. This would
85allow the existing SIGUSR2 code to actually produce dated log files in a
86similar way to eggdrop and some IRCd software does in their own rotate log
87functions while making the whole system somewaht less susceptable to any
88other issues. Using eggdrop as an example, it is again a simple
89configuration item to have this system optional for any users of services
90that do not use daily logs.
91
923) The error system needs some improvement. &quot;Read error from server:
93Success&quot; is not a useful error message. The nature of the error needs
94reporting.
95
96
97Should I manage to extract any further information as to the cause of the
98problem, I will notify the group, but after months of this issue occurring
99on and off with only once a date testing facilities, it does seem far easier
100to merely rewrite the code that is causing the problem.
101
102Mark.
103
104
105</PRE>
106
107<!--endarticle-->
108 <HR>
109 <P><UL>
110 <!--threads-->
111 <LI>Previous message: <A HREF="002637.html">[IRCServices] Version 5.0 alpha release available
112</A></li>
113 <LI>Next message: <A HREF="002638.html">[IRCServices] killclones
114</A></li>
115 <LI> <B>Messages sorted by:</B>
116 <a href="date.html#2639">[ date ]</a>
117 <a href="thread.html#2639">[ thread ]</a>
118 <a href="subject.html#2639">[ subject ]</a>
119 <a href="author.html#2639">[ author ]</a>
120 </LI>
121 </UL>
122
123</body></html>