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

GetPickedEditorDataItems causes OutOfMemory exception #203

Open
mbilas opened this issue Mar 5, 2021 · 2 comments
Open

GetPickedEditorDataItems causes OutOfMemory exception #203

mbilas opened this issue Mar 5, 2021 · 2 comments

Comments

@mbilas
Copy link

mbilas commented Mar 5, 2021

Hello,
our Umbraco 7 instance has integrated nuPickers editors. We are mainly focused on work with DotNetCheckBoxPicker. Recently we were affected by an issue with memory clogging on our web server. Our investigation led us to GetPickedEditorDataItems method used on mentioned picker property.
When it happened? When this method was used many times in short period of time (ex. 35 calls per second). All available memory servers was full and IIS server has not responded. Every operation ended with OutOfMemoryException.
The last information in logs before the server was killed:

System.NullReferenceException: Object reference not set to an instance of an object. 
at IEnumerable<EditorDataItem> nuPickers.Shared.DotNetDataSource.DotNetDataSource.nuPickers.Shared.DataSource.IDataSource.GetEditorDataItems(int currentId, int parentId, string[] keys) 
at IEnumerable<EditorDataItem> nuPickers.Shared.Editor.Editor.GetEditorDataItems(int currentId, int parentId, string propertyAlias, IDataSource dataSource, string customLabelMacro, string[] keys) 
at IEnumerable<EditorDataItem> nuPickers.Picker.GetPickedEditorDataItems() 

We are using the most recent version 1.7.1. Any chance to check GetPickedEditorDataItems what can be wrong that it takes up a lot of memory?

@christopher-thomas
Copy link

Hi there, just a note to say that I'm experiencing an issue with this also. In my application calling this method seems to load a duplicate instance of the uComponents.nuPickers.dll into the Application Domain.

Repeatable by calling the method and then checking:

AppDomain currentDomain = AppDomain.CurrentDomain;
Assembly[] assems = currentDomain.GetAssemblies();

@mbilas, do you manage to find a fix for this?

@mbilas
Copy link
Author

mbilas commented Feb 8, 2022

Hi @christopher-thomas, we have introduced a cache, so now GetPickedEditorDataItems method is called only once for a given period of time (of course short). It looks that it is a solution for that case only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants