July 15, 2024

As Sitecore with Containers is new, we wanted to try some hands on and do some POC before actually implementing it with AKS and Containers.


We added a new Publishing Target to the local environment, mainly for Preview purpose before it is pushed to Live. As soon as the <database> config node was added, Sitecore started getting crashed and kept on getting restarted. And when we removed the database node, Sitecore was working well.

Here is the database config patch file that we had added for preview:

<?xml version="1.0"?>

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
		  <database id="preview" patch:after="database[@id='web']" singleInstance="true" type="Sitecore.Data.DefaultDatabase, Sitecore.Kernel">
			  <param desc="name">$(id)</param>
			  <dataProviders hint="list:AddDataProvider">
				  <dataProvider ref="dataProviders/main" param1="$(id)">
					  <prefetch hint="raw:AddPrefetch">
						  <sc.include file="/App_Config/Prefetch/Common.config" />
						  <sc.include file="/App_Config/Prefetch/Webdb.config" />
			  <proxyDataProvider ref="proxyDataProviders/main" param1="$(id)" />
			  <archives hint="raw:AddArchive">
				  <archive name="archive" />
				  <archive name="recyclebin" />
			  <cacheSizes hint="setting">


We achieved this by creating a .dat file – inside the App_Data/items folder. This is basically similar to creating Item Resource Files.

What we did – is we created a folder inside the App_Data/items folder with the same name as that of the database – as in our case – “preview” and inside it we created a file items.webcluster2.dat – which was a copy of items.web.dat file.

Again, we did this with Sitecore 10.1 and this approach is not officially supported by Sitecore but we made it working for our case.

Also, we found a couple of references which helped us gain more confidence on what we had done and also showed some direction

Special thanks to my friend and colleague Jatin Prajapati who helped in troubleshooting and we found this solution together.



Happy Sitecoring and Happy Dockering! 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *