azure - Azure Functions 内存不足异常
问题描述
我有一个 Azure Functions Powershell 核心,如下所示:
# Input bindings are passed in via param block.
param([byte[]] $InputBlob, $TriggerMetadata)
# Write out the blob name and size to the information log.
Write-Host "PowerShell Blob trigger function Processed blob! Name: $($TriggerMetadata.Name) Size: $($InputBlob.Length) bytes Uri: $($TriggerMetadata.Uri)"
通过使用 Blob 触发器,我想使用 Powershell 从 Azure Blob 读取 VDH OS 映像并将它们转换为托管磁盘。图像大小为 30GB。当函数被触发时,我得到下面的System.OutOfMemoryException:
2020-09-07T09:52:44.704 [Error] Executed 'Functions.BlobTrigger1' (Failed, Id=93b00718-9941-4379-abd0-348137cdcff2, Duration=56449ms)Exception of type 'System.OutOfMemoryException' was thrown.
2020-09-07T09:52:45.061 [Information] Stopping JobHost
我增加了应用计划以获得 14GB 的内存,但我遇到了同样的内存异常。
当我直接从Cloud Shell执行此操作时,我获得了成功,但我的主要目标是使用Blob Trigger自动化脚本。
你有什么建议吗?
解决方案
推荐阅读
- html - 删除 Windows 10 动画会停止 CSS Smooth Scroll
- java - Java Instant.parse 无法验证日期
- mysql - 双向多对一关联。插入新子项时,还会插入一个新的不需要的父项,并与子项具有相同的名称
- tableau-api - 维度 Tableau 的百分比和值
- nginx - NGINX - 基于查询参数的不同后端代理
- python - 转换列表中的每个第 n 个元素
- html - 为什么快速滚动在 div 上有效,但在 body 标签上无效?
- eclipse-cdt - 从带有调试信息的可执行文件创建托管的 Eclipse CDT 项目?
- java - 模式匹配不适用于 MVEL.eval
- c# - 将 Azure 应用服务连接到本地 SQL 数据库的不同方法