Try our conversational search powered by Generative AI!

EpiServer CMS 9.12 SQL error in edit mode

Vote:
 

Hi,

I'm developing in EpiServer CMS version 9.12.2.0 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?

#216026
Jan 22, 2020 11:48
Vote:
 

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?

#216044
Jan 22, 2020 14:22
Vote:
 

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?

#216103
Edited, Jan 24, 2020 16:38
Vote:
 

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.

#216116
Edited, Jan 25, 2020 18:26
Vote:
 

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

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

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!

#216307
Feb 03, 2020 14:36
- Feb 14, 2020 12:33
Excellent! Happy to help!
J
Vote:
 

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?

#217068
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.