Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An import of lots of datatypes can restart site and abort import #18

Closed
KevinJump opened this issue Apr 29, 2019 · 6 comments
Closed

An import of lots of datatypes can restart site and abort import #18

KevinJump opened this issue Apr 29, 2019 · 6 comments
Labels
help wanted Extra attention is needed Known Issue Thing we know about, and will look at

Comments

@KevinJump
Copy link
Owner

When you do a full import of datatypes (especially with Models builder in PureLive Mode) - the import might hang:

Running in debug we get this error :

System.Runtime.Serialization.SerializationException
HResult=0x8013150C
Message=Type is not resolved for member 'Umbraco.Core.Security.UmbracoBackOfficeIdentity,Umbraco.Core, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null'.
Source=
StackTrace:

This appears to be coming from the internal serialization within Umbraco when the cache event is triggered.

we have a debug option to use batch saving, that is don't save the datatypes individually but in one block when at the end, using dataTypeService.Save(items) - but this also causes the error.

turning models builder off live mode, makes this largely go away - but that just might be because it reduces the number of cache rebuilds in Umbraco.

the datatype serializer updates the datatypes here
https://github.com/KevinJump/uSync8/blob/master/uSync8.Core/Serialization/Serializers/DataTypeSerializer.cs#L34

the save happens in the parent class or in the handler if we are doing a 'batch' save.
So all saves go through these two save functions here :
https://github.com/KevinJump/uSync8/blob/master/uSync8.Core/Serialization/Serializers/DataTypeSerializer.cs#L181

the issue was already happening when using hte direct save in DeserializeCore that is now commented out

@KevinJump KevinJump added help wanted Extra attention is needed Known Issue Thing we know about, and will look at labels Apr 29, 2019
@JCrepin
Copy link
Contributor

JCrepin commented Jun 7, 2019

IIRC, this error occurs during an App Domain restart from Umbraco, and the error occurs from the IIS process (w3wp), because IIS doesn't know about the custom class Umbraco uses for membership.

I never managed to find a solid fix aside from turning off live mode for models builder, but my assumption is that this is because of the app restart that occurs due to this setting. https://docs.microsoft.com/en-us/dotnet/api/system.web.configuration.compilationsection.numrecompilesbeforeapprestart?view=netframework-4.8

KevinJump pushed a commit that referenced this issue Sep 18, 2019
Trying to reduce the number of saves, so models builder doesn't trigger to many times.
@KevinJump
Copy link
Owner Author

Having checked with people - the best we can do at the moment is make batch mode, as save light as possible, as such the update above, reduces the number of saves we make in batch mode, it also stops the triggering of events when datatypes are saved - Which I am not 100% happy with - but it will be for batch mode only so hopefully not an issue.

@KevinJump KevinJump added this to the 8.2.1 - Patche Release milestone Sep 18, 2019
@KevinJump KevinJump changed the title An import of lots of datatypes can return An import of lots of datatypes can restart site and abort import Sep 18, 2019
@KevinJump KevinJump removed this from the 8.2.1 - Patche Release milestone Sep 18, 2019
@KevinJump
Copy link
Owner Author

Removing the Event Trigger from the datatypes causes other issues.

putting it back, causes the models builder issue to happen on forced imports :(

KevinJump pushed a commit that referenced this issue Sep 19, 2019
no need to batch upmedia saves, and it causes issues anyway.
@John-Blair
Copy link

I had this problem. I fixed it by changing the web.cofig modelsmode in my import site from PureLive to DLL i.e. this makes models building manual, allowing me to import lots of Data Types without any issues.

<add key="Umbraco.ModelsBuilder.ModelsMode" value="Dll" />

@KevinJump
Copy link
Owner Author

yep - that's our current recommendation, (we have it in the readme now - https://jumoo.co.uk/usync/modelsbuilder)

This is issue still open because we are not sure if it also relates to the other NuCache issue #40 (which it might not, but we are testing stuff).

@KevinJump
Copy link
Owner Author

i think most of these issues are resolved in Umbraco 8.2.+ installations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed Known Issue Thing we know about, and will look at
Projects
None yet
Development

No branches or pull requests

3 participants