Problem description
After the app is deployed to the app service, an out of memory error is encountered.
Error message: GetData Error:, Exception of type ‘System.OutOfMemoryException’ was thrown.,
at System.IO.MemoryStream.set_ Capacity(Int32 value)
at System.IO.MemoryStream.EnsureCapacity(Int32 value)
at System.IO.MemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at OfficeOpenXml.Packaging.ZipPackage..ctor(Stream stream)
at OfficeOpenXml.ExcelPackage.ConstructNewFile(String password)
at OfficeOpenXml.ExcelPackage..ctor(FileInfo newFile)
at MyLife.Utility.ExcelHelper.LoadDataTableFromFile(String fileName)
at MyLife.Serivces.GetData()
2021-09-12 05:19:57.0362 | Error | HCPService-StartPreprocessing-Exception of type ‘System.OutOfMemoryException’ was thrown.-
2021-09-12 05:19:57.0756 | Error | An unhandled exception has occurred while executing the request. System.OutOfMemoryException: Exception of type ‘System.OutOfMemoryException’ was thrown.
Problem solving
In the case of oom error at the beginning of deployment, it means that the memroy of the current pricing layer is not enough to meet the operation of the application. However, the memory of different pricing layers of APP service is different. The lowest free layer has 1g ram and the highest can reach 14g.
(Source : https://www.azure.cn/pricing/details/app-service/ )
If the memory limitation of the pricing layer is excluded, another important factor is the platform setting of APP service.
App service supports 32-bit and 64 bit platform systems. Therefore, if the default setting is 32-bit operating system, it only supports 4G memory at most. In order to make the application use the maximum memory and not waste the ram resources of APP service, when facing the problem of oom, modify the 64 bit platform bit of APP service at the first time. If oom still occurs, you can consider upgrading the pricing layer of APP service.
[END]
Similar Posts:
- Java – Stream has already been operated upon or closed
- Easygbs runs with an error of too many open files and cannot play the video stream. How to adjust?
- Error log: resource leak: ‘xxx’ is never closed (precautions for scanner class)
- Idea Error: No provider available from registry 127.0.0.1:2181 for service
- The difference between system.err.println and system.out.println
- [Download Files Error] HttpMessageNotWritableException IllegalStateException: COMPLETED
- How to Solve SSM Error: Request processing failed; nested exceptionis java.lang.NullPointerExceptio
- [Solved] expected single matching bean but found 2
- Unity5.4.x Update to Unity2019 Error: -System.MissingMethodException