<html><head></head><body><div class="ydp15bc8972yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div><div dir="ltr" data-setdir="false">Thank you, <span>Michelle and </span>Frank!<br></div><div><br></div><div class="ydp15bc8972signature"><div style="font-family:Helvetica, Arial, sans-serif;font-size:13px;"><div><br> </div><span><div class="ydp744c546bsignature">Regards,</div><div class="ydp744c546bsignature"> Adrian Videanu</div><div class="ydp744c546bsignature"><span>Skype: videanu.adrian</span></div></span><div><span><span>Tel:+40723864025</span></span></div></div></div></div>
        <div><br></div><div><br></div>
        
        </div><div id="ydpc84060edyahoo_quoted_8195642415" class="ydpc84060edyahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Thursday, July 22, 2021, 10:17:41 AM GMT+3, Frank Buschmann <frank@fbiscience.com> wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div id="ydpc84060edyiv8824068003"><div>
<p>To circumvent the issue with stalled connections I've written a script, that resets the 'stalled' status with a sql query, initiated by a cronjob:<br clear="none">
<br clear="none">
#!/bin/bash<br clear="none">
<br clear="none">
NEEDS_RESTART=`psql -qAt -U postgres -d bucardo -c "select count(*) from bucardo.sync where status='stalled'"`;<br clear="none">
<br clear="none">
if [ ! -e $BUCARDO_RESTART_LOG ] ;<br clear="none">
then<br clear="none">
        touch $BUCARDO_RESTART_LOG;<br clear="none">
fi<br clear="none">
<br clear="none">
if [ "$NEEDS_RESTART" != "0" ] ;<br clear="none">
then<br clear="none">
        `psql -qAt -U postgres -d bucardo -c "update bucardo.sync set status = 'inactive' where status='stalled'"`;<br clear="none">
<br clear="none">
        bucardo deactivate all<br clear="none">
        bucardo restart<br clear="none">
<br clear="none">
fi<br clear="none">
<br clear="none">
We set 'deactivate all' since here, except the main database (master) all other masters are most of the time offline and initiate the sync by themselves on demand with a local application.<br clear="none">
<br clear="none">
Cheers,<br clear="none">
Frank.<br clear="none">
<br clear="none">
<br clear="none">
----- Nachricht von Michelle Sullivan <<a shape="rect" href="mailto:michelle@sorbs.net" rel="nofollow" target="_blank">michelle@sorbs.net</a>> ---------<br clear="none">
  Datum: Thu, 22 Jul 2021 06:51:10 +1000<br clear="none">
    Von: Michelle Sullivan <<a shape="rect" href="mailto:michelle@sorbs.net" rel="nofollow" target="_blank">michelle@sorbs.net</a>><br clear="none">
Betreff: Re: [Bucardo-general] cannot restart stalled sync<br clear="none">
     An: Videanu Adrian <<a shape="rect" href="mailto:videanuadrian@yahoo.com" rel="nofollow" target="_blank">videanuadrian@yahoo.com</a>><br clear="none">
     Cc: <a shape="rect" href="mailto:bucardo-general@bucardo.org" rel="nofollow" target="_blank">bucardo-general@bucardo.org</a></p>
<div class="ydpc84060edyiv8824068003yqt3228799269" id="ydpc84060edyiv8824068003yqt52987"><blockquote style="border-left:2px solid blue;margin-left:2px;padding-left:12px;" type="cite">
<p>Just so you know I have to reset the column in the sync table as well... been doing it for years, it’s not a problem to do it as far as I can see.<br clear="none">
<br clear="none"></p>
<div dir="ltr" id="ydpc84060edyiv8824068003AppleMailSignature">Michelle Sullivan
<div><a shape="rect" href="http://www.mhix.org/" rel="nofollow" target="_blank">http://www.mhix.org/</a></div>
<div>Hallowed are those that walk in unison.</div>
</div>
<div dir="ltr"><br clear="none">
On 22 Jul 2021, at 02:03, Videanu Adrian <<a shape="rect" href="mailto:videanuadrian@yahoo.com" rel="nofollow" target="_blank">videanuadrian@yahoo.com</a>> wrote:<br clear="none">
 </div>
<blockquote type="cite">
<div dir="ltr">
<div class="ydpc84060edyiv8824068003ydp1c04199cyahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;">
<div>
<div dir="ltr">Hi all,</div>
<div dir="ltr"> </div>
<div dir="ltr">I`m running a 4 nodes master-master cluster with bucardo 5.4.1. Each node is in a different geographical region.</div>
<div dir="ltr">Last night I had some problems with the internet in one of the locations and the replication was stopped.</div>
<div dir="ltr"> </div>
<div dir="ltr">The problem is that when the internet was back the majority of the syncs were stalled.<br clear="none">
<div>I have tried the classical</div>
<div dir="ltr"> </div>
<div dir="ltr">stop bucardo</div>
<div dir="ltr">deactivate sync X</div>
<div dir="ltr">activate sync X</div>
<div dir="ltr">validate sync X</div>
<div dir="ltr">start bucardo</div>
<div dir="ltr"> </div>
<div dir="ltr">but it seems to have no effect, these are still stalled even If when I validate the syncs I receive the [OK] message.</div>
<div dir="ltr"> </div>
<div dir="ltr">In order to work, I had to manually edit the syncs table from the bucardo database and update stalled with active.</div>
</div>
<div> </div>
<div dir="ltr">I`m afraid that by doing this I`ll break something internally in bucardo.</div>
<div dir="ltr"> </div>
<div dir="ltr">Any idea why it may behave like this?</div>
<div class="ydpc84060edyiv8824068003ydp1c04199csignature">
<div style="font-family:Helvetica, Arial, sans-serif;font-size:13px;">
<div> </div>
<div class="ydpc84060edyiv8824068003ydp744c546bsignature"><span>Regards,</span></div>
<div class="ydpc84060edyiv8824068003ydp744c546bsignature"><span>Adrian Videanu</span></div>
<div class="ydpc84060edyiv8824068003ydp744c546bsignature"><span><span>Skype: videanu.adrian</span></span></div>
<div><span><span>Tel:+40723864025</span></span></div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<blockquote type="cite">
<div dir="ltr"><span>_______________________________________________</span><br clear="none">
<span>Bucardo-general mailing list</span><br clear="none">
<span><a shape="rect" href="mailto:Bucardo-general@bucardo.org" rel="nofollow" target="_blank">Bucardo-general@bucardo.org</a></span><br clear="none">
<span><a shape="rect" href="https://bucardo.org/mailman/listinfo/bucardo-general" rel="nofollow" target="_blank">https://bucardo.org/mailman/listinfo/bucardo-general</a></span></div>
</blockquote>
</blockquote></div>
<p><br clear="none">
<br clear="none">
<br clear="none">
----- Ende der Nachricht von Michelle Sullivan <<a shape="rect" href="mailto:michelle@sorbs.net" rel="nofollow" target="_blank">michelle@sorbs.net</a>> -----<br clear="none">
<br clear="none"></p>
</div></div></div>
            </div>
        </div></body></html>