Error when removing property from content type

Vote:
 

Hi.

So I'm doing some clean up on deprecated properties on our content types, but I'm having an issue I dont know how to solve. I have removed som properties from the code, then I started up the EPI project and syncronized the property type in the admin interface and as expected the removed properties got listed as "missing". However, when I try to delete the missing properties I'm getting an SQL timeout error.

I suspect it might be because these are content types with a lot of properties, and quite a lot of data in them. 

Any suggestions on how I can remove these properties?

kent

#248330
Feb 08, 2021 12:07
Vote:
 

Hi

You can try to decrease the number of allowed page versions as that will reduce the number of items in the database. You can also increase the sql timeout in the connection string.

Best regards

Oskar

#248331
Edited, Feb 08, 2021 12:28
Vote:
 

you can delete property from code and after that, you should be able to delete the orphan property in CMS -> Admin -> Content Types.

To double-check if these properties are still in use, I would go to Find -> Overview and Explore the desired content type. (Do not know how you set up properties but I assume the property you are trying to delete is nested property)

To investigate SQL time out - you can go to Azure portal databases and select your environment database (I assume you are using DXP). You can check which queries are taking long or timing out. 

#248332
Feb 08, 2021 12:31
Vote:
 

Oskar: I like the idea of trying to set the SQL timeout, is it just a matter of increasing the value for "Connection Timeout" in the connection string?

Naveed: I have already deleted the property from the code and we are not using DXP.

EDIT: The "Connection Timeout" in the connection string does not help. I need to set the timeout for the SQL Execution somehow.

#248333
Edited, Feb 08, 2021 12:43
Vote:
 

Kent - my fear is if you are increasing timeout, you might be hiding problem under the carpet :)  Just a thought. 

Can you inspect with the SQL profiler?

#248334
Feb 08, 2021 13:00
Kent Roger Felgen - Feb 08, 2021 13:10
I think we might be talking past each other here, I'm only thinking about increasing the timeout to get rid of the property and then switching back.
Vote:
 

Yes that is correct, I was thinking about command timeout and that can not be set in the connection string.

You can try with the solution in this ticket, increasing the value for databaseQueryTimeout , https://support.episerver.com/hc/en-us/articles/360038938952-Episerver-CMS-Timeout-exceptions-during-scheduled-jobs

#248335
Edited, Feb 08, 2021 13:01
Kent Roger Felgen - Feb 08, 2021 14:29
That worked a lot better, thanks for the help!
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.