[Bucardo-general] cannot restart stalled sync

Videanu Adrian videanuadrian at yahoo.com
Wed Jul 28 12:18:04 UTC 2021

Thank you, Michelle and Frank!

 Regards, Adrian VideanuSkype: videanu.adrianTel:+40723864025 

    On Thursday, July 22, 2021, 10:17:41 AM GMT+3, Frank Buschmann <frank at fbiscience.com> wrote:  
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:


NEEDS_RESTART=`psql -qAt -U postgres -d bucardo -c "select count(*) from bucardo.sync where status='stalled'"`;

if [ ! -e $BUCARDO_RESTART_LOG ] ;
        touch $BUCARDO_RESTART_LOG;

if [ "$NEEDS_RESTART" != "0" ] ;
        `psql -qAt -U postgres -d bucardo -c "update bucardo.sync set status = 'inactive' where status='stalled'"`;

        bucardo deactivate all
        bucardo restart


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.


----- Nachricht von Michelle Sullivan <michelle at sorbs.net> ---------
  Datum: Thu, 22 Jul 2021 06:51:10 +1000
    Von: Michelle Sullivan <michelle at sorbs.net>
Betreff: Re: [Bucardo-general] cannot restart stalled sync
     An: Videanu Adrian <videanuadrian at yahoo.com>
     Cc: bucardo-general at bucardo.org

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.

Michelle Sullivanhttp://www.mhix.org/Hallowed are those that walk in unison.
On 22 Jul 2021, at 02:03, Videanu Adrian <videanuadrian at yahoo.com> wrote:
Hi all, I`m running a 4 nodes master-master cluster with bucardo 5.4.1. Each node is in a different geographical region.Last night I had some problems with the internet in one of the locations and the replication was stopped. The problem is that when the internet was back the majority of the syncs were stalled.
I have tried the classical stop bucardodeactivate sync Xactivate sync Xvalidate sync Xstart bucardo but it seems to have no effect, these are still stalled even If when I validate the syncs I receive the [OK] message. In order to work, I had to manually edit the syncs table from the bucardo database and update stalled with active. I`m afraid that by doing this I`ll break something internally in bucardo. Any idea why it may behave like this? Regards,Adrian VideanuSkype: videanu.adrianTel:+40723864025

Bucardo-general mailing list
Bucardo-general at bucardo.org

----- Ende der Nachricht von Michelle Sullivan <michelle at sorbs.net> -----

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://bucardo.org/pipermail/bucardo-general/attachments/20210728/5223ae09/attachment.htm>

More information about the Bucardo-general mailing list