我在我们的服务器上部署了一个 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
发布评论
评论(2)
请先检查此链接。
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
我曾经遇到过类似的问题,在 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?