操作超时 – ASP

发布于 2024-12-07 06:07:44 字数 926 浏览 0 评论 0原文

我有一个在 IIS 5.1 上运行的普通 ASP 应用程序。 ASP 文件中的以下代码会导致 IIS 抛出“操作超时”错误。然而,尽管出现错误,该进程仍继续在后台服务器上运行,并最终按预期完成。

我通过 IIS MMC 和 ASP 文件 (Server.ScriptTimeout) 将 IIS 中的 ASP 脚本超时从 90 秒(默认)增加到 600、1000 甚至 10000 秒(我知道非常高的脚本超时的影响),但发生了错误无论脚本超时设置如何,始终如一。

WebServ 是一个 COM+ 应用程序,我观察到应用程序内部运行的进程大约需要 80 - 90 秒。此应用程序不会在内部操纵任何 IIS 设置。

尽管可以优化 COM+ 应用程序中的代码,但我怀疑单独的优化是否有帮助,因为该应用程序处理存储在 SQL Server 中的大量数据。因此,随着数据库的增长,应用程序很可能需要 90 秒以上才能完成该过程。

因此有人可以帮助我理解吗 1. 为什么无论ASP脚本超时设置如何,都会出现“操作超时”错误? 2. 我们应该怎样做才能为ASP文件争取更多的时间来完成这个过程?

PS 我确实浏览了许多与此错误消息相关的其他帖子,但不幸的是没有找到任何有用的内容。

谢谢。

<%
Server.ScriptTimeout = 10000

.... initialize the variables....

Set WebServ = CreateObject("WebServ.RunCommand")

lcResult = WebServ.Call(SessionKey, ConfigID, Program, Function, Mode, Params)

Set WebServ = Nothing

With Response
    .ContentType = "text/xml"
    .Write(lcResult)
End With
%>

I have a vanilla ASP app that runs on IIS 5.1. The below code in an ASP file causes the IIS throw the “Operation timed out” error. However despite of the error the process continues to run on the server at the background and eventually completes as expected.

I increased the ASP Script timeout in IIS via both IIS MMC and the ASP file (Server.ScriptTimeout) from 90 seconds (default) to 600, 1000 and even 10000 seconds (I know the implications of very high script timeouts) but the error occurred consistently regardless of the scrip timeout set.

WebServ is a COM+ app and I observed that the process that runs inside the app takes about 80 - 90 seconds. This app does not manipulate any IIS settings internally.

Although the code in the COM+ app could be optimized, I doubt that the optimizations alone will help because the application deals with large amount of data stored in SQL Server. Hence chances are high that the app will need more than 90 seconds to complete the process as the databases grow.

Therefore can somebody please help me understand
1. Why the error “Operation timed out” occurs regardless of the ASP Script timeout set?
2. What should we do to buy more time for the ASP file to complete the process?

P.S. I did browse a number of other posts here related to this error message but unfortunately did not find anything helpful.

Thanks.

<%
Server.ScriptTimeout = 10000

.... initialize the variables....

Set WebServ = CreateObject("WebServ.RunCommand")

lcResult = WebServ.Call(SessionKey, ConfigID, Program, Function, Mode, Params)

Set WebServ = Nothing

With Response
    .ContentType = "text/xml"
    .Write(lcResult)
End With
%>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

失与倦" 2024-12-14 06:07:44

请尝试增加应用程序的附加应用程序池中的超时。

Please try to increase time out in Attached application pool of the application.

三五鸿雁 2024-12-14 06:07:44

lcResult 的内容应该是什么?

在代码中放置几个​​response.write和response.end来尝试查找超时发生的位置。

What should the contents of lcResult be?

Place several response.write and response.end in your code to try to find where the timeout is happening.

无畏 2024-12-14 06:07:44

我建议将输出调试字符串添加到 COM 模块。

http://msdn.microsoft .com/en-us/library/windows/desktop/aa363362%28v=vs.85%29.aspx

您可以使用以下命令查看它们您的调试器或 DebugView (http://technet.microsoft.com/en-us/sysinternals/bb896647)

以及我会将输出调试字符串包装为 COM 模块以从 ASP 使用它。

I suggest to add Output Debug Strings to the COM Modules.

http://msdn.microsoft.com/en-us/library/windows/desktop/aa363362%28v=vs.85%29.aspx

you can view them with your debugger or DebugView (http://technet.microsoft.com/en-us/sysinternals/bb896647)

aswell i would wrap output debug string as a COM Module to use it from ASP.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文