如何解决Azure功能内存不足异常
我有一个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触发器。
您有什么建议吗?
解决方法
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。