使用 Lucene.Net 的 ASP.NET 应用程序随着时间的推移变得越来越慢
我使用 Lucene.Net 进行搜索的网站随着时间的推移逐渐变慢。我已将 IIS 设置为以 1.5GB 回收应用程序池。
回收后,应用程序再次快速运行。
诊断搜索的哪些部分导致问题的最佳步骤是什么?
值得注意的是,这绝对是搜索引起的问题,因为它只是应用程序的这一部分变得缓慢。无论时间如何,正常页面都可以正常加载。
A website I have using Lucene.Net for search is progressively getting slower over time. I have set IIS to recycle the app pool at 1.5GBs.
After a recycle the app is fast again.
What are the best steps in diagnosing which parts of the search is causing the issue?
Its worth noting, it is definitely the search that's causing the issues as its only this part of the application which gets slow. A normal page loads fine regardless of time.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您已经分析了搜索代码,并且发现速度太复杂或不明显,那么我会从运行性能监视器 (perfmon.exe) 并记录结果开始。查看 CPU 使用率、内存、磁盘队列、ASP.Net 特定计数器(排队的请求、请求/秒)和 CLR 计数器(管道实例计数、抛出的异常、上下文切换/秒等)的变化。
一旦您可以将一些看起来不寻常的事情归零(随着时间的推移,它们的声音会不受控制地增长),您就可以开始缩小任何代码问题的范围。
If you have analyzed your search code and it's too complex or not obvious what the slowdowns are, I would start with running performance monitors (perfmon.exe) and logging the results. Look at change in CPU usage, memory, disk queuing, ASP.Net specific counters (requests queued, requests/sec) and CLR counters (pipeline instance count, exceptions thrown, context switches/sec, etc.).
Once you can zero in on some things that look out of the ordinary (growing unchecked over time by the sounds of it), you can start to narrow down any code problems.
大更新后您会优化索引吗?这确实可以提高性能。
Do you optimize your index after big updates ? This can really improve performance.