ASP Web 应用程序超时和可能的配置问题

发布于 2024-12-08 11:17:26 字数 319 浏览 1 评论 0 原文

我在我们的服务器上部署了一个 asp/IIS 应用程序,每次我们重新启动它或由于新的应用程序修改而重新启动时,该应用程序都运行良好。然而,10-20 分钟后,即使尝试重复与我之前在应用程序运行良好时所做的完全相同的步骤,它也会开始出现卡顿和超时。

Web 应用程序用于从查询中提取数据。当它所提取的数据库离我们很近时,它运行得很好,但我们最近不得不更改主机,现在我们的数据库已经跨越了半个地球。所以我不确定这是否是一个集中在配置端的问题,或者我们是否必须在应用程序代码本身中做一些事情来防止超时。

应用程序正在查询 Postgres 数据库,如果此信息有任何用处。

提前致谢

I have an asp/IIS application deployed on our server that runs fine every time we reboot it or restart due to new application modifications. However, after 10-20 minutes it starts to chug and timeout even when trying to repeat the exact same steps as I've done before when the application was running fine.

The web application is used to pull data from queries. It ran fine when the database it was pulling from was close to us, but we recently had to change hosts and now our database is halfway around the world. So I am not sure if this is an issue that is focused on the configuration end or if we have to do something within the application code itself to prevent the timeout.

The application is querying a Postgres database if this information is of any use.

Thanks in advance

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

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

发布评论

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

评论(2

站稳脚跟 2024-12-15 11:17:26

请先检查此链接。

http://www.c-sharpcorner.com/UploadFile/technoNet/SessionTimeout02192009052301AM /SessionTimeout.aspx

否则

我认为这是由于表单身份验证超时设置。

“表单身份验证票证可以通过两种方式超时。如果您使用绝对过期,则会出现第一种情况。使用绝对过期时,身份验证票证会在过期时间过期时过期。例如,您设置过期时间为 20 分钟,并且用户 用户在下午 2:20 之后访问该网站,则该用户将被重定向到登录页面。

如果 如果用户访问则更新例如,您使用滑动过期设置了 20 分钟的过期时间,用户在下午 2:00 访问该网站,并且该用户收到一个设置为 2:00 过期的 cookie:下午 20 点。仅当用户在下午 2:10 后访问该站点时,才会更新到期时间。如果用户在下午 2:09 访问该站点,则该票证不会更新,因为尚未经过一半的到期时间。然后等待12分钟,下午2点21分访问现场,门票将过期。用户被重定向到登录页面。”

另外,请通过下面的链接您可以获得更多信息。

http://itworksonmymachine.wordpress.com/2008/07/17/forms-authentication-timeout-vs-session-timeout/
http://support.microsoft.com/kb/910439
http://www.abstraction.net/ViewArticle.aspx?articleID=74
http://codeasp.net /blogs/vivek_iit/microsoft-net/848/forms-authentication-timeout-vs-session-state-timeout

Please check this link first.

http://www.c-sharpcorner.com/UploadFile/technoNet/SessionTimeout02192009052301AM/SessionTimeout.aspx

Otherwise

I think it's due to Forms Authentication timeout settings.

"The forms authentication ticket can time out in two ways. The first scenario occurs if you use absolute expiration. With absolute expiration, the authentication ticket expires when the expiration time expires. For example, you set an expiration of 20 minutes, and a user visits the site at 2:00 PM. The user will be redirected to the login page if the user visits the site after 2:20 PM.

If you use sliding expiration, the scenario is a bit more complicated. The cookie and the resulting ticket are updated if the user visits the site after the expiration time is half-expired. For example, you set an expiration of 20 minutes by using sliding expiration. A user visits the site at 2:00 PM, and the user receives a cookie that is set to expire at 2:20 PM. The expiration is only updated if the user visits the site after 2:10 PM. If the user visits the site at 2:09 PM, the ticket is not updated because half of the expiration time has not passed. If the user then waits 12 minutes, visiting the site at 2:21 PM, the ticket will be expired. The user is redirected to the login page."

Also please go through below link you can get more idea on this.

http://itworksonmymachine.wordpress.com/2008/07/17/forms-authentication-timeout-vs-session-timeout/
http://support.microsoft.com/kb/910439
http://www.abstraction.net/ViewArticle.aspx?articleID=74
http://codeasp.net/blogs/vivek_iit/microsoft-net/848/forms-authentication-timeout-vs-session-state-timeout

许一世地老天荒 2024-12-15 11:17:26

我曾经遇到过类似的问题,在 Session_End 事件中出现无限循环。如果您的会话超时为 20 分钟,则可能会导致问题,因为之前一切运行正常。也许您尝试在 Session_End 中记录一些内容,这会导致数据库出现问题?

I once had a similar problem with an endless loop in the Session_End event. If your session timeout is 20min that could cause the problem as everything runs ok before. Maybe you try to log something in Session_End which causes trouble with the database?

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