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 &quot;some text&quot; &gt;&gt; $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>         &gt; $i;<br>
    done;<br><br>    sync;<br>    sleep 1;<br><br>    echo -n &quot;.&quot;<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=&#39;affile_sd_curpos(/var/log/applogs/mysql/mysqld.log)&#39;, stored_inode=&#39;1753383&#39;, cur_file_inode=&#39;1753383&#39;, stored_size=&#39;10&#39;, cur_file_size=&#39;0&#39;<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=&#39;affile_sd_curpos(/var/log/applogs/mysql/mysql-slow.log)&#39;, stored_inode=&#39;1753478&#39;, cur_file_inode=&#39;1753478&#39;, stored_size=&#39;114118&#39;, cur_file_size=&#39;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">&lt;<a href="mailto:algernon@balabit.hu">algernon@balabit.hu</a>&gt;</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">&gt; The patch did not solve the problem. Syslog-ng appears to loop over<br>
&gt; 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&#39;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&#39;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&#39;t. Therefore I think it&#39;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>