Web 服务器速度变慢 (ASP.NET)

发布于 2024-08-10 22:19:55 字数 708 浏览 1 评论 0原文

我们有一个非常奇怪的问题。服务器场中的一台服务器变得非常慢。我们在日志中看到许多超时,并且总体响应时间没有达到应有的水平(并且在场中的其他服务器上)。

同样奇怪的是,它不仅仅是 Web 应用程序 - 仅登录服务器就需要 1.5 分钟才能显示桌面。一旦你进入,系统就会像以前一样响应 - 除非你尝试启动某些东西,即记事本 - 需要一分钟才能启动,启动后它工作正常。

我检查了很多事情 - 内存利用率合理,CPU 低于 15%,Windows 句柄、事件日志没有显示任何内容。

回收 aps.net 进程并不能解决问题 - 登录仍然需要一分多钟的时间。重新启动服务器有所帮助,但现在它又开始变慢。

仔细查看后,我们发现 Windows Temp 目录充满了临时文件 - 超过 65k 个文件。这当然是需要注意的事情。但我的问题是,这可能是经济低迷的根本原因,还是还有其他东西潜伏在阴影中?

编辑

经过更多挖掘后,我将注意力集中在与临时目录大小相关的问题上。这篇文章: 描述了非常相似的东西。我仍然不太确定,因为即使使用记事本打开服务器也很慢这一事实仍然无法解释。

在这种情况下创建新的临时文件是否可能需要一分钟多的时间?

We have a really strange problem. One of the servers in the server farm becomes really slow. We see a number of timeouts in the logs and overall response time is not where it should be (and is on other servers in the farm).

What is also strange is that it is not just the web app - Just logging into the server takes up to 1.5 min to show you the desktop. Once you are in, the system is as responsive as ever - unless you try to launch something, i.e. notepad - it takes another minute to launch and after launch it works fine.

I checked a number of things - memory utilization is reasonable, CPU is below 15%, windows handles, event logs do not show anything.

Recycling the aps.net process does not fix it - it still takes over a minute to log in. Rebooting the server helped, but now it started to slow down again.

After a closer look we found out that Windows Temp directory is full of temp files - over 65k files. This is certainly something to take care of. But my question is could it be the root cause of the sluggishness, or there is still something else lurking in the shadows?

Edit

After more digging I am zeroing in on the issue related to the size of temp directories. This article: describes something very similar. I am still not too sure because the fact that the server is slow to open even Notepad remains unexplained.

Is it possible that under such conditions creating a new temp file takes over a minute?

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

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

发布评论

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

评论(3

分分钟 2024-08-17 22:19:55

您可能需要检查发生超时时 ASP.NET 线程池中使用了多少个线程。另一个想法可能是查看 perfmon 中的 GC 信息,看看 GC 是否正在运行 gen2 收集?

You might want to check how many threads your using in the ASP.NET thread pool when the timeouts occur. Another idea might be to look at the GC information in perfmon and see if the GC is running a gen2 collection?

┼── 2024-08-17 22:19:55

好吧,这是官方的,所有这一切都是由此问题引起的悲伤。当我们的一台服务器再次表现不佳时,我们清理了临时目录并解决了问题,包括登录缓慢。

最后一部分仍然让我困惑 - 我不明白临时目录中的文件数量过多会导致登录时间超过 1 分钟,更不用说启动程序了,但无论清除目录如何修复它,我都可以忍受它。

Ok, It is official, all of this was grief caused by this issue. When one of our servers was again behaving badly we cleaned the temp directory and it fixed the problem, including the slow login.

This last part still baffles me - I do not understand how excessive number of files in a temp directory can cause login to take over 1 min, leave alone launching a program, but whatever it is clearing the directory fixed it and I can live with it.

单身情人 2024-08-17 22:19:55

你也检查过虚拟内存吗?寻呼?您的应用程序是否在不同的文件中记录大量数据?另外 - 检查 - 也许利用率发生在内核模式而不是用户模式。

Did you check virtual memory as well ? paging ? does you app logs a lot of data in different files ? also - check - maybe the utilization happens in kernel mode and not user mode.

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