Recently we have got an weird issue reported by our content authors on production. They mentioned the content are not reflected on website after they been publish or even re-publish.
First I wanted to check does the Publishing service doing all right and publishing contents correctly. Checked and it was working absolutely fine. I did switch to web database and validated recently published content. After some initial trouble shoot, discovered on CDs, the cache is not been clearing upon successful publish.
This leads my thought to suspect event queue table may have been flooded with lots of entry and may need a clean.
Did a eventqueue table cleaning as mentioned here and things did not went to normal. Still published changes were not reflecting on the website.
Now, I need to dive into detail to understand what is happening in eventqueue table.
The Properties table holds the last event execution time stamp against all the CDs.
To get that last run timestamp follow below steps:
- go to your web app and open the Kudu advance tool.
- Navigate to Environment page from menu in header
- Get the Machine Name from System Info section
- Open SSMS and connect to Database
- Open new query window for the database which is configured as your Event Queue database( in our case we have configured dedicated one. By default it is web)
- Run below query to get the last run time stamp for that CD instance
SELECT * FROM Properties where Key LIKE '%WEB_EQSTAMP_<<MACHINENAME>>%' ORDER BY Value DESC
- Replace<<MACHINENAME>> in above query with machine name from step 3 above
Depending on how may instances your selected CD is running, it will show you that may rows (by default there will be two rows for each CD. one is for Production instance and another for pre-prod instance). The value column holds the Time stamp value of last run.
Now, that we have the last run time stamp for the CD, we can get the list of all pending events for this CD instance by running below query.
SELECT * FROM EventQueue WHERE Stamp >= CONVERT(VARBINARY, <<TIMESTAMP>>) ORDER BY Created DESC
Replace the <<TIMESTAMP>> with the value from previous query.
By combining all queries together, the final query will look like below
SELECT * FROM EventQueue WHERE Stamp >= ( SELECT CONVERT(VARBINARY, Value) from [Properties] where [Key] = 'WEB_EQSTAMP_<<MACHINENAME>>' ) ORDER BY [Created] DESC
After all this investigation, it is clear that CD servers are not triggering remote events registered in dedicated event queue table.
Did little more investigation and found out wrong event queue configuration files has been deployed to CDs accidentally and that was causing this behavior. We placed the correct config files for dedicated event queue and the peace has been established on CD role again.
Happy Event queue trouble shooting…!!!