ASP.Net 防止长时间运行的进程超时
我有一个 ASP.net 页面,它上传 CSV 文件,然后对其进行一些处理。对于大文件,这可能需要长达 10 分钟才能完成。然而,该过程最终超时。
我已将以下内容添加到 web.config:
<httpRuntime executionTimeout="1200" maxRequestLength="104856" />
另外,我已进入 IIS 并将连接超时设置为 1,200 秒。我还在 IIS 中将 ASP 脚本超时设置为 1,200 秒。
但是,大约 2 分钟后,网络日志文件停止更新。
关于导致此停止处理的原因有什么想法吗?我还缺少哪些其他超时设置?
谢谢!
I have an ASP.net page that uploads a CSV file and then does some processing on it. This can possibly take up to 10 minutes to complete for a large file. However, the process ends up timing out.
I have added the following to the web.config:
<httpRuntime executionTimeout="1200" maxRequestLength="104856" />
Also, I have gone into IIS and set the Connection Timeout to 1,200 seconds. I also set the ASP script timeout to 1,200 seconds in IIS as well.
However, after approximately 2 minutes the web log file stops getting updated.
Any ideas on what is causing this to stop processing? What other timeout settings am I missing?
THanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我通常会尽量避免长时间运行的请求。您确定这是最好的方法吗?过去,我有过以下情况:
通过网络应用程序上传了文档,但没有对其进行操作。基本上将其上传到受监视的文件夹,然后通过单独的进程对其进行处理。
使用替代方法上传文档(通常是 ftp)。再次,使用单独的进程处理该文件。
可能不是您正在寻找的答案,但它可能是解决您问题的更好方法?
I usually try to avoid long running requests. Are you sure this is the best way to do this? In the past I have either:
Uploaded the document through the web app, but not acted on it. Basically upload it to a watched folder and then process it through a separate process.
Use an alternate method to upload the document (ftp usually). Again, process the file with a separate process.
Probably not the answer you were looking for, but it might be a better solution to your problem?