gpt4 book ai didi

iis - 为什么大型 POST 请求无法到达我的 Azure Web 角色?

转载 作者:行者123 更新时间:2023-12-02 07:14:52 26 4
gpt4 key购买 nike

在我的 Azure Web 角色中,处理大于约 3000 万字节的 POST 请求时出现问题。我知道 IIS 过滤器会检测所有大于 3000 万字节的请求并将其结果设置为 404。但我预计这些 404 代码将显示在 IIS 日志中。

我的 Web 角色的一名用户面临以下行为:对我的 Web 角色中小于约 3000 万字节的特定 URL 的 POST 请求可以正常通过(我在 IIS 日志中看到它们),但 POST 请求较大比这(到完全相同的 URL)为客户端生成 HTTP 503(服务不可用)代码,并且我在 IIS 日志中没有看到这些请求。

这是示例长 POST 的 header

POST /mySpecificUrl?paramshere HTTP/1.1
User-Agent: Custom USer Agent
Content-Type: application/octet-stream
Proxy-Authorization: NTLM LongBase64StringHere
Host: my.hostname.here
Content-Length: content length here - about 32 megabytes
Expect: 100-continue

看起来有些东西正在拦截这些请求 - 也许是负载均衡器或其他东西,因此它们无法达到我的角色。

现在用户使用 Fiddler,他声称当他收到代码 503 时,将返回以下内容:

Hello,
A communication error occurred: ""
The Web Server may be down, too busy, or experiencing other
problems preventing it from responding to requests.
You may wish to try again at a later time.

制作为 HTML。此内容附带的 header 不包含我们注入(inject)到每个响应中的自定义 header ,因此这是请求未到达 IIS 的另一个证据。

如何找出导致此行为的原因以及如何控制它(例如,更改请求大小阈值)?

最佳答案

我完全确定有什么东西阻止了到达 IIS 的请求。可能是防火墙规则或负载均衡器,这就是您在 IIS 中看不到日志的原因。坏消息是,我找不到一种方法来判断您将发布大量内容。

尝试将此配置应用于“ServiceDefinition.csdef”文件,看看它是否有帮助:

<?xml version="1.0" encoding="utf-8"?>
<ServiceDefinition name="WindowsAzure1" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2013-03.2.0">
<LoadBalancerProbes>
<LoadBalancerProbe protocol="http" name="config" timeoutInSeconds="36000"></LoadBalancerProbe>
</LoadBalancerProbes>
<WebRole name="webRoleConfig">
<Runtime executionContext="elevated"></Runtime>
</WebRole>
</ServiceDefinition>

关于iis - 为什么大型 POST 请求无法到达我的 Azure Web 角色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17926150/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com