Great! Thanks very much!<br>Your fix works.<br>I tested it with the following script:<br><br>#!/bin/bash<br><br>while `true`; do<br> for i in /var/log/applogs/mysql/mysqld.log /var/log/applogs/mysql/mysql-slow.log;<br> do<br>
echo "some text" >> $i;<br> done;<br> <br> sync;<br> sleep 1;<br><br> for i in /var/log/applogs/mysql/mysqld.log /var/log/applogs/mysql/mysql-slow.log;<br> do<br> > $i;<br>
done;<br><br> sync;<br> sleep 1;<br><br> echo -n "."<br>done<br><br>The only side-effect I found so far, is that I no longer see the following messages in system log:<br><br>Feb 2 16:43:58 lio-db8 syslog-ng[8876]: The current log file has a mismatching size/inode information, restarting from the beginning; state='affile_sd_curpos(/var/log/applogs/mysql/mysqld.log)', stored_inode='1753383', cur_file_inode='1753383', stored_size='10', cur_file_size='0'<br>
Feb 2 16:43:58 lio--db8 syslog-ng[8876]: The current log file has a mismatching size/inode information, restarting from the beginning; state='affile_sd_curpos(/var/log/applogs/mysql/mysql-slow.log)', stored_inode='1753478', cur_file_inode='1753478', stored_size='114118', cur_file_size='0<br>
<br>But I can live with that.<br><br>Again, thanks very much for the fix!!!<br><br><div class="gmail_quote">On Wed, Feb 2, 2011 at 11:53 PM, Gergely Nagy <span dir="ltr"><<a href="mailto:algernon@balabit.hu">algernon@balabit.hu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">On Wed, 2011-02-02 at 19:58 +0300, Mailing Lists wrote:<br>
</div><div class="im">> The patch did not solve the problem. Syslog-ng appears to loop over<br>
> the empty source file.<br>
<br>
</div>The attached patch fixes the problem, but it may have unwanted side<br>
effects - although off the top of my head, I can't think of any, nor did<br>
my tests reveal anything.<br>
<br>
Works For Me(tm) applies.<br>
<br>
The proper solution will need a bit more thinking, unfortunately. I know<br>
why the problem appears, and I know why the attached fix works, but I do<br>
not understand the reason why the line I removed was there in a first<br>
place.<br>
<br>
I suppose there was a reason behind it, but I've yet to figure that out.<br>
<br>
In the meantime, the attached patch should help. I tried my best to find<br>
any ill side-effects, but so far, I couldn't. Therefore I think it's<br>
pretty safe, but no guarantees.<br>
<font color="#888888"><br>
--<br>
|8]<br>
<br>
</font><br>______________________________________________________________________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
FAQ: <a href="http://www.campin.net/syslog-ng/faq.html" target="_blank">http://www.campin.net/syslog-ng/faq.html</a><br>
<br>
<br></blockquote></div><br>