zoukankan      html  css  js  c++  java
  • 【Azure 应用服务】App Service下部署的应用报错 Out of Memory

    问题描述

    应用部署到App Service后,遇见了Out of Memory的错误。

    报错信息: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.

    问题解决

    面对部署后刚开始启动就出现OOM的错误情况,表示当前定价层的Memroy不足以满足应用的运行。但是App Service不同定价层的内存不同,最低的免费层的RAM为1G,最高可达到14G。

     (Source : https://www.azure.cn/pricing/details/app-service/) 

    如果排除是定价层的内存限制外,还有一个重要的因素就是App Service的平台设置。

    App Service支持32位,64位的平台系统。所以如果默认设置的位32位操作系统,那么它最大只支持4G的内存。为了让应用能使用最大的内存并不让APP Service的RAM资源浪费,当面临OOM的问题时,第一时间修改App Service的平台位数位64位。如果依旧出现OOM的情况,就可以考虑升级App Service的定价层。

    [END]

    当在复杂的环境中面临问题,格物之道需:浊而静之徐清,安以动之徐生。 云中,恰是如此!

  • 相关阅读:
    如何用密码保护共享文件?
    如何让光驱自动弹出和关闭?
    欢迎参加“诊断 Windows 7 启动及登录缓慢问题”在线技术会议
    谁偷走了我的系统资源?
    修改Windows验证的登陆框为页面
    使用Fiddler提高前端工作效率
    对非管理员隐藏Site Actions的菜单
    C#多线程参数传递
    转:管理网站集所使用的内容数据库
    转:十步骤让你轻松提升SharePoint性能
  • 原文地址:https://www.cnblogs.com/lulight/p/15398852.html
Copyright © 2011-2022 走看看