Mon Aug 15 16:40:04 PDT 2005
- Previous message: [Slony1-general] Slony appears to restart every 11 minutes and log rotation
- Next message: [Slony1-general] watchdogs
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, 2005-08-15 at 10:27 -0400, Tim Goodaire wrote: > On Fri, Aug 12, 2005 at 04:11:11PM -0400, Sven Willenberger wrote: > > FreeBSD 5.4 > > slony1-1.1.0 > > postgresql 8.0.3 > > > > I have been banging my head over slony log rotation for quite some time > > now and I am at a loss. Here is the situation: > > > > I have 2 ways I can start slony: > > > > 1) su slony -c "/usr/local/bin/slon -p /var/run/slon/slon.pid -d 2 T1 > > dbname=thedb > /usr/local/etc/slony/slony.out 2>&1 &" > > > > or > > > > 2) su slony -c "/usr/local/bin/slon -f /usr/local/etc/slon.conf > > > /dev/null 2>&1 &" > > > > Both of these methods will start up slon, background it so as not to > > spew messages to console and get tied to tty, and log it (either to the > > slony.out file in case #1, or /var/log/slony.log via syslog in case #2). > > > > Here is the problem: > > > > With method 1, if I use newsyslog to rotate slony.out (or manually > > rotate it), issuing a kill -HUP to to /var/run/slon/slon.pid restarts > > the process but it will not log to the new file, it actually logs to > > slony.out.0 -- i.e. it appears to latch onto the inode number of the > > logfile and will not renew it during a sighup. The result is no clean > > way of rotating the logfile other than stopping slon, rotating the > > logfile, and then starting slon. > > You could look into using apache rotatelogs to rotate your slony logs. > It works very well, and is directly supported by the altperl scripts. > > _______________________________________________ I hadn't even thought of that! Thanks, I have installed this and am testing this method versus a shell-based while-do-read loop for logging. Sven
- Previous message: [Slony1-general] Slony appears to restart every 11 minutes and log rotation
- Next message: [Slony1-general] watchdogs
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list