Description
When running the site on multiple instances, Site Settings are not replicated to the memory of other instances.
When updating a property in the Site Settings and publishing the content, the update is stored in the database. However the SettingsService stores a copy of the settings in memory public ConcurrentDictionary<string, Dictionary<Type, object>> SiteSettings
This is done in the PublishContent
event using UpdateSettings(...)
. This event is only triggered on the instance you are connected to. The other instances don't trigger this event, therefore not updating the SiteSettings dictionary and returning old settings.
Issue can be replicated by using 2 browsers. Check the ARRAffinity cookie for the instance Id you are connect to. They must be different for both browsers. In both browsers open the same page that displays one of the site settings. Update the site setting in browser 1 and refresh the page. the updated setting is visible. Refresh the page in browser 2, it still displays the old setting.
Browser 2 won't display the new setting unless you publish it from that browser as well (causing the dictionary to update)