Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Hi,
We're using Azure App Service with slot deployments and experience unexpected behavior with content sync when swapping - old content version is being synced on top of latest content version.
EPiServer version: 11
Host Environment: Azure App Service (with slots)
Both Staging and Live slots use same databases, Staging has readOnly enabled using App service App settings
we are not using content versioning
configuration:
both slots have app setting: episerver:ReadOnlyConfigurationAPI - true
on Staging: slot specific (sticky) Azure app service app setting: episerver:DatabaseMode - ReadOnly
ReadOnly setting seems to be working - staging slot shows errors saying that DB is in ReadOnly mode. If app is restarted - content does not sync.
now during deployment:
we deploy to staging and trigger swap imediatelly.
Lets say current live slot (and epi model) has content with ModelType 'PageTypeOne'.
we deploy new version with new content 'PageTypeOne' and 'PageTypeTwo' to staging slot (ideally we would remove readOnly flag before deployment and add it afterwards to allow content to sync first time, but that's not relevant to the issue we're seeing so lets assume ReadOnly is always enabled on staging).
swap starts - live settings are applied to staging, readOnly flag removed, app restarts, content syncs and now contains both 'PageTypeOne' and 'PageTypeTwo'. (btw, we're validating using sql query: