简体   繁体   English

随着时间的流逝,ASP.NET应用程序变得越来越慢

[英]ASP.NET Application Gets Slower Over Time

I'm running a .NET C# (4.5) web forms application and on our production server, the application gets slower and slower for everyone over time until about an hour where it becomes pretty much unusable and we just restart the server. 我正在运行.NET C#(4.5)Web窗体应用程序,并且在生产服务器上,随着时间的流逝,每个人的应用程序变得越来越慢,直到大约一个小时它变得几乎无法使用,我们才重新启动服务器。

It works perfectly fine on my local machine. 它在我的本地计算机上运行良好。 Never gets slower at all. 绝对不会变慢。 So I'm trying to think of what would be different. 所以我试图考虑会有什么不同。

My local machine connect to the same database. 我的本地计算机连接到同一数据库。 There's also some active directory things being used for logins but that also connects to the same place on both my local and production environments. 还有一些用于登录的活动目录,但也可以连接到本地和生产环境中的同一位置。

I have debug off in the web.config. 我已经在web.config中调试了。 I've also looked up pretty much any other solutions and haven't had luck. 我还查找了几乎所有其他解决方案,但还没有碰到运气。

I did see some stuff about viewstates building up with ajax requests. 我确实看到了一些有关用ajax请求构建视图状态的内容。 I do have a page with updatepanels that are refreshing every few seconds, but I'm confused as to why the production server would be getting slower over time with this and not my local machine testing. 我确实有一个页面,其中的updatepanels每隔几秒钟就会刷新一次,但是对于为什么生产服务器随着时间而不是我的本地机器测试会随着时间的推移变得越来越慢感到困惑。

There's only about 10 people using the application at the moment also. 目前,也只有大约10个人在使用该应用程序。 Any ideas? 有任何想法吗?

Refreshing a bunch of updatepanels every few seconds is not a good idea pretty much. 每隔几秒钟刷新一堆更新面板并不是一个好主意。 I was able to optimize things here and there but in the end it was the auto refreshing that was slowing things down. 我能够在这里和那里进行优化,但最终是由于自动刷新使事情变慢了。 Completely reprogrammed using signalr to grab updates and now it's very fast. 使用signalr进行了完全重新编程,以获取更新,现在非常快。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM