Azure 函数 - 发布失败 - RequestTimeout [英] Azure Function - Publishing Failed - RequestTimeout

查看:14
本文介绍了Azure 函数 - 发布失败 - RequestTimeout的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个基本的 Azure Function 应用.当我尝试发布应用程序时,我收到一条错误消息,显示错误:尝试通过 https://...发布 ZIP 文件失败,并出现 HTTP 状态代码 RequestTimeout.".

I have a basic Azure Function app. When I try to publish the app, I receive an error that says "error : The attempt to publish the ZIP file through https://... failed with HTTP status code RequestTimeout.".

此应用是 .NET Standard 应用.我按照说明 这里.不同之处在于,我的应用程序有一个事件中心触发器,而不是文档中显示的 Http 触发器.我不明白为什么我在部署期间遇到超时.我也不知道怎么克服.

This app is a .NET Standard app. I followed the instructions here. The difference is, my app has an Event Hub Trigger instead of the Http Trigger shown in the documentation. I don't understand why i'm getting a Timeout during deployment. I also don't know how to get past this.

我做错了什么?

更新

这里是日志.

1>------ Build started: Project: MyProject.Functions, Configuration: Release Any CPU ------
1>MyProject.Functions -> C:MyProjectMyProject.FunctionsinRelease
etcoreapp2.1inMyProject.Functions.dll
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
  Publish Started
  MyProject.Functions -> C:MyProjectMyProject.FunctionsinRelease
etcoreapp2.1inMyProject.Functions.dll
  MyProject.Functions -> C:MyProjectMyProject.FunctionsobjRelease
etcoreapp2.1PubTmpOut
  Publishing C:MyProjectMyProject.FunctionsobjRelease
etcoreapp2.1PubTmpMyProject.Functions - 20181101105531356.zip to https://my-project.scm.azurewebsites.net/api/zipdeploy...
C:Usersme.nugetpackagesmicrosoft.net.sdk.functions1.0.23uild
etstandard1.0Microsoft.NET.Sdk.Functions.Publish.ZipDeploy.targets(42,5): error : The attempt to publish the ZIP file through https://my-project.scm.azurewebsites.net/api/zipdeploy failed with HTTP status code RequestTimeout. [C:MyProjectMyProject.FunctionsMyProject.Functions.csproj]

推荐答案

据此:https://github.com/projectkudu/kudu/wiki/从压缩文件部署

您应该能够将 ?isAsync=true 传递给 zipdeploy url(因此它将是:'https://my-project.scm.azurewebsites.net/api/zipdeploy?isAsync=true'

you should be able to pass ?isAsync=true to the zipdeploy url (so it would be: 'https://my-project.scm.azurewebsites.net/api/zipdeploy?isAsync=true'

此请求在没有超时的情况下解决得更快,然后您可以从响应中获取位置标头,您可以轮询以查看部署的状态.

This requests resolves faster without a timeout and then you can grab the location header from the response, which you can poll to see the status of your deployment.

这篇关于Azure 函数 - 发布失败 - RequestTimeout的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆