You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are currently running a single non production Orchard Code instance and have encountered a performance issue. Our current investigations and research are pointing to a memory leak. It appears the application does not always release memory so performance deteriorates over time and the application ends up crashing eventually. We currently run approximately 200 test tenants and use media with real time image resizing.
We’ve spent a good amount of time analyzing the memory dumps and performance metrics and we believe the issue could be in SixLabors.ImageSharp.Memory.ArrayPoolMemoryAllocator.
As the next steps we were going to try managing memory allocation for ImageSharp with the following settings:
I can't offer any special insights into ImageSharp memory management - other than to say I have used some of the constrained memory configurations with Azure Functions (limited ram) previously.
What I have seen is that in a constrained memory environment it is possible to force, or receive, bad requests, when trying to real time resize many images at once - these generally result in a 500 error, but will complete on the next request.
I've never analysed that to see if it resulted in any memory leaks, but it might be interesting for you to check your logs to see if you are hitting memory limits.
You might want to open an issue with ImageSharp, I (think) the memory management part of it is managed at an ImageSharp level, rather than an ImageSharp.Web level, if that makes sense.
We are currently running a single non production Orchard Code instance and have encountered a performance issue. Our current investigations and research are pointing to a memory leak. It appears the application does not always release memory so performance deteriorates over time and the application ends up crashing eventually. We currently run approximately 200 test tenants and use media with real time image resizing.
We’ve spent a good amount of time analyzing the memory dumps and performance metrics and we believe the issue could be in SixLabors.ImageSharp.Memory.ArrayPoolMemoryAllocator.
As the next steps we were going to try managing memory allocation for ImageSharp with the following settings:
Configuration.Default.MemoryAllocator = ArrayPoolMemoryAllocator.CreateWithModeratePooling();
Configuration.Default.MemoryAllocator.ReleaseRetainedResources();
https://docs.sixlabors.com/articles/imagesharp/memorymanagement.html
Do you have any additional insights or recommendations?
Our Current Configurations:
Azure AppService Tier:
S1 - 100 total ACU, 1.75 GB memory
Databases:
Approximately 200 Azure SQL databases under SQL elastic pool
Media:
Azure Blobs
Thanks.
The text was updated successfully, but these errors were encountered: