Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Vilius 12 posts 102 karma points notactivated
    Sep 29, 2021 @ 13:52
    Vilius
    0

    Umbraco servers not registered on flexible load balancing

    Currently, my site gets issues with inconsistent Examine index between master and slave sites. When I looked into the database in the umbracoServer table, there was no entries. Though bellow code defintely ran

    public class LoadBalancingConfig : ApplicationEventHandler
    {
        private static readonly ILog Log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
    
        protected override void ApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
        {
            ServerMessengerResolver.Current.SetServerMessenger(
                new BatchedDatabaseServerMessenger(
                    applicationContext,
                    true,
                    new DatabaseServerMessengerOptions()
                    {
                        DaysToRetainInstructions = 2, // 2 days
                        ThrottleSeconds = 5, // 5 second
                        MaxProcessingInstructionCount = 1000,
                        PruneThrottleSeconds = 60 // 1 minute
                    }
                )
            );
    
            var isMasterServer = ConfigurationManager.AppSettings[ArcticConstants.AppSettinKeys.Environment] == ArcticConstants.Environments.Backoffice;
    
            IServerRegistrar2 serverRegistrar = isMasterServer ? new MasterServerRegistrar() as IServerRegistrar2 : new FrontEndReadOnlyServerRegistrar();
    
            ServerRegistrarResolver.Current.SetServerRegistrar(serverRegistrar);
    
            Log.Warn($"Enabling flexible loadbalancing. Server role set to: {serverRegistrar.GetCurrentServerRole().ToString("G")}");
        }
    }
    

    These are things I would like to know: What could I be missing within configuration?
    Which table holds queues to update slave sites? Any ideas how to force slave site to update Examine index based on master?

  • Gabor Ferencz 40 posts 181 karma points
    May 26, 2022 @ 13:50
    Gabor Ferencz
    0

    Did you ever find out what was causing the issue?

  • Vilius 12 posts 102 karma points notactivated
    May 29, 2022 @ 18:56
    Vilius
    0

    No, I haven't

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies