504服务器错误 [英] 504 Error On Server

查看:165
本文介绍了504服务器错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将数据加载到文本文件中,当程序需要很长时间(大量数据)时,我得到504响应(在Fiddler中查看),显然文件无法生成。我以为我会尝试在web.config中增加会话超时,但这没有帮助。

I'm loading data into a text file and when the procedure takes long (lots of data) I get a 504 response (viewed in Fiddler) and obviously the file fails to generate. I thought I'd try increasing the session timeout in my web.config, but that didn't help.

是否有一些属性可以确定超时?

Is there some property that determines the timeout for this?

感谢任何帮助。

推荐答案

这很可能与httpRuntime有关web.config元素:

This is most likely related to httpRuntime web.config element:

<httpRuntime
   maxRequestLength= "4096"     />

maxRequestLength 是整数值,指定输入流的限制KB。默认值为4096(4 MB)设置为此级别,旨在避免用户将大型文件发布到服务器。

maxRequestLength is in integer value that specifies the limit for the input stream in KB. The default is 4096 (4 MB) set to this level with the intention to avoid users posting large files to the server.

此外,您可能需要添加 executionTimeout =999999此元素的属性。

Additionally you may need to add the executionTimeout="999999" attribute to this element.

请注意,Microsoft文档指出了有关executionTimeout的调试模式:

Please note that Microsoft documentation indicates about debugging mode regarding the executionTimeout:

executionTimeout 默认值为00:01:50(110秒)。

executionTimeout The default is "00:01:50" (110 seconds).

仅当编译元素中的debug属性为False时,此超时才适用。为了防止在调试时关闭应用程序,请不要将此超时设置为较大的值。

This time-out applies only if the debug attribute in the compilation element is False. To help to prevent shutting down the application while you are debugging, do not set this time-out to a large value.

这篇关于504服务器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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