Try our conversational search powered by Generative AI!

EpiServer CMS 9.12 SQL error in edit mode



I'm developing in EpiServer CMS version as an IT consultant for a customer that we have.

We are having a problem after deploying into production, where this SQL error (see attachment below) appears when our customer is trying to edit pages in the CMS.

Everything seems to work fine locally, however, after deploying to production this error will sometimes appear. As a temporary solution this can (sometimes) be solved by doing a redeploy, but we are unsure why.

We could do simple changes, like adding a single property to a page type. Then after deploying, when our customer tries to edit the input field for this new property, this error appears before publishing can be done. This can happen to multiple pagetypes and there are no issues with the code.

We also tried to change and rename the properties used, but this doesn't solve the problem.

Any ideas (except for updating the CMS and keep redeploying) for what we can do here? Maybe someone have some more information about this issue and why it happens, and in what version it eventually was solved?

Jan 22, 2020 11:48

Are several servers using the same database?

Does this only happen when you make changes to page types?

Have you set enableModelSyncCommit  to true in web.config?

Jan 22, 2020 14:22

Thanks for answering. Yes we have 3 servers using the same database. They use different versions of the code, which lets us deploy to one server while another one is running in production, so when the deployment is done we can easily switch servers (redirect the domain name) so the downtime will be minimal. The third server has the same updated code but also includes access to edit the CMS through the URL (/episerver/cms) while the two others won't.

We also get the same problem here. After checking this checkbox we get the same error in our log files:

The error seems to only appear when we do changes to page types. 

We don't have enableModelSyncCommit in our web.config at all.

Any ideas?

Edited, Jan 24, 2020 16:38

The problem is likely that servers running different versions of your code are using the same database. The servers are all trying to update the database to suit their view of the world. This will only be an issue when you make changes to page (or block) types, or update the database schema.

I will suggest that you set enableModelSyncCommit=true on one server only, and enableModelSyncCommit=false on all others.

If you can tell your editors to stay away from the publishing server during deploy, I would set it to true on the server that will be the active frontend server after deploy. If not, I would set it to true on the editor server.

Edited, Jan 25, 2020 18:26

Thanks! I will give it a try on monday :)

Jan 25, 2020 19:16
Tomas Hensrud Gulla - Jan 29, 2020 11:52
How did it work out?

Seems like it solved the problems. We now have enableModelSyncCommit set to true on our server for editing the CMS and set to false on the other servers.

Thanks for helping!

Feb 03, 2020 14:36
- Feb 14, 2020 12:33
Excellent! Happy to help!

We are having the same issue but we are on DXC using the PaaS deployment tool, where we do not have control 'per server' as it is a cloud-based environment.

Any suggestions please?

Feb 14, 2020 10:36
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.