【发布时间】:2022-02-09 16:26:44
【问题描述】:
我创建了一个 API,它调用其他 API 并返回一个很长的字符串(大约 200mb)。
每次我向它发出请求时,它都需要很长时间才能运行,然后只响应 4mb(精确)的响应并关闭应用程序池。
我尝试了这些解决方案:
- 将
executionTimeout和shutdownTimeout增加到01:00:00 - 将
bufferingOn设置为false,将bufferingLimit设置为1073741824 - 禁用
Rapid-Fail Protection
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath=".\Program.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
</system.webServer>
</location>
<system.web>
<httpRuntime executionTimeout="3600" shutdownTimeout="3600" />
</system.web>
</configuration>
<location path="Internal Interfaces">
<system.webServer>
<asp bufferingOn="false">
<limits bufferingLimit="1073741824" />
</asp>
</system.webServer>
</location>
谢谢,
卡伦
【问题讨论】:
标签: asp.net-core-webapi iis-10