在IIS上运行的Django网关超时 [英] Django Gateway Timeout running on IIS

查看:111
本文介绍了在IIS上运行的Django网关超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在具有IIS Web服务器的Windows 10计算机上运行Django应用程序.基于用户命令的应用程序启动一个硒实例,并尝试从第三方站点收集一些数据.问题是,当收集数据的时间很长时,实际上超过30秒钟,我在客户端就会收到504网关超时.我在网上搜索并找到了一些要设置的参数,包括:

I am running a Django app on a windows 10 machine with IIS web server. The application based on user command starts a selenium instance and try to collect some data from third party sites. The problem is that when the collecting data gets long time, actually more than 30s i get a 504 Gateway Timeout at the client. I searched across the web and find some parameters to set including:

ARR timeout
application pool idle timeout
Default website Connection timeout

在applicationHost.config文件中添加以下参数:

adding following parameters to the applicationHost.config file:

<application fullPath="..." arguments="...\wfastcgi.py" signalBeforeTerminateSeconds="60" idleTimeout="900" activityTimeout="180" requestTimeout="10000" />

但是,他们中的任何一个都帮了忙,而504则在30年代再次出现.

But, any of them helped and the 504 again on 30s.

推荐答案

要解决此问题,您可以按照以下步骤操作:

To resolve the issue you can follow the below steps:

1)打开iis管理器.

1)open iis manager.

2)选择您的Django网站(不是默认网站)

2)select your Django site (not default site)

3)从操作窗格中单击高级设置.

3)click on advance setting from the action pane.

4)根据您的要求增加连接超时值.

4)increase the connection time out value as per your requirement.

注意:首先检查在不托管iis的情况下使用该站点将花费多少时间,以及要传输数据的站点是什么.

Note: First check that when you use the site without hosting in iis how much time it will take and what is the site of the data which is transferred.

这篇关于在IIS上运行的Django网关超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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