-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Site Settings not updated when running on multiple instances #895
Comments
We have exactly the same problem using Site Settings in DXP Production. Any idea on how to solve this? |
Can you please check the diff of the pull requests #909 if this fixes your issues before I merge. |
I will implement this change and get back to you when verified. |
We have now implemented the changes, deployed them to preprod, scaled up environment and verified with two browsers with different ARRAffinity cookies. A change to the web site settings is still only shown in the browser where the change was published not the other one. |
My fix was mostly solved by updating
The key here is calling and for invalidation purposes we added
Think we needed to change some stuff, like
to
and do some type casting in code, otherwise the code changes above (if I remember correctly) works well for us. We have some more changes in our solution, so I can't just copy&paste the whole stuff, and won't do a PR now. |
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 usingUpdateSettings(...)
. 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)
The text was updated successfully, but these errors were encountered: