Aspose.Slides.Cloud.Sdk.ApiException: 'Out of memory.' exception on "DeleteUnusedLayoutSlidesOnline" call

I am using ASPOSE Slides as a container (I am using slides-cloud:24.4) and when I am calling DeleteUnusedLayoutSlidesOnline() method from my C# code I have Aspose.Slides.Cloud.Sdk.ApiException: ‘Out of memory.’ exception. Seems like it does not depend on PC RAM (I have 32 GB).
How I can fix it?
Thanks.

@sivopliasov.roko

The “Out of memory” exception you are encountering when calling the DeleteUnusedLayoutSlidesOnline method may be related to the size of the presentation you are working with, especially if it contains large images or complex elements. Although you have sufficient RAM (32 GB), the memory required to process the presentation can exceed available resources due to how images and other elements are handled in memory.

Here are some steps you can take to potentially resolve this issue:

  1. Optimize Presentation Size: Before calling the DeleteUnusedLayoutSlidesOnline method, try to reduce the size of your presentation. This can include compressing images or removing unnecessary elements.

  2. Increase Memory Allocation: If you are running this in a constrained environment (like a cloud service), ensure that the service has enough memory allocated for processing large presentations.

  3. Load Presentation in Smaller Chunks: If possible, consider breaking down the presentation into smaller parts and processing them individually. This can help manage memory usage more effectively.

  4. Check for Memory Leaks: Ensure that your application is not leaking memory elsewhere, which could contribute to the out-of-memory error.

  5. Update Aspose.Slides: Make sure you are using the latest version of Aspose.Slides, as updates may include performance improvements and bug fixes that could resolve memory issues.

If these suggestions do not resolve the issue, consider reaching out to Aspose support for further assistance, as they may have more specific insights into memory management for the DeleteUnusedLayoutSlidesOnline method.

If you have any additional details about the presentation or the specific context in which the error occurs, please share them for more tailored advice.