You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows服务器部署Flask应用时FastCGI超时循环问题求助

Windows服务器部署Flask应用时FastCGI超时循环问题求助

大家好,我现在在Windows服务器上部署Flask(Python)应用时遇到了一个棘手的超时问题,想请各位帮忙分析下。

最开始应用一直抛出请求超时错误,我把超时时间调整到300秒(5分钟)后,又开始出现活动超时错误。于是我也把活动超时时间设置为5分钟,但没想到过了5分钟之后,请求超时的问题又再次出现,陷入了这样的循环里。

我已经给Python和应用中用到的ffmpeg工具配置了正确的权限,应该不是权限导致的问题。

下面是我的web.config文件内容:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="MyApp Handler"
path="*"
verb="*"
modules="FastCgiModule"
scriptProcessor="c:\users\<username>\appdata\local\programs\python\python38\python.exe|c:\users\<username>\appdata\local\programs\python\python38\lib\site-packages\wfastcgi.py"
resourceType="Unspecified"
requireAccess="Script" />
</handlers>
</system.webServer>
<appSettings>
<add key="PYTHONPATH" value="C:\inetpub\wwwroot\myapp" />
<add key="WSGI_HANDLER" value="app.app" />
</appSettings>
</configuration>

如果需要我提供其他信息,比如应用日志、服务器的其他配置项等,欢迎在评论区告诉我!

备注:内容来源于stack exchange,提问作者Ankit Tiwari

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.23 07:54:27