Enyim 的 Memcache (northscale) 套接字池问题

发布于 2024-12-03 17:03:05 字数 480 浏览 1 评论 0原文

我正在使用 Northscale 1.0.0,需要一些帮助才能使其运行足够长的时间以升级到新版本。我使用 C# 和 ASP.NET 使用 Enyim 库来处理它。我目前怀疑应用程序在我的 app.config 中的 socketPool 设置中没有足够的连接。我还注意到,以前的开发人员的代码只是将尝试对 MemCache 进行 Get 调用的任何异常视为该项目不在缓存中,这(我相信)可能会导致在池获取时对数据库的调用出现周期性峰值。饿死了。我们一直遇到奇怪的负载峰值,这似乎与服务器负载没有任何关系。我怀疑他没有正确管理与 Northscale 的连接的生命周期,因此我们会定期遇到套接字池饥饿的情况,但我无法证明这一点。

当我调用 Get 方法从缓存中检索项目时,是否存在应该查找的特定异常?我在文档中并没有真正看到太多可以给我提供足够信息的文档。有人有这方面的示例代码吗?我什至会接受 java 或 php 代码,因为我认为 .NET 库可能是基于其中之一的。

有什么想法吗?

谢谢, 将要

I'm using Northscale 1.0.0 and need a little help getting it to limp along for long enough to upgrade to the new version. I'm using C# and ASP.NET to work with it using the Enyim libraries. I currently suspect that the application does not have enough connections per the socketPool setting in my app.config. I also noted that the previous developer's code simply treats ANY exception from an attempted Get call to MemCache as if the item isn't in the cache, which (I believe) may be resulting in periodic spikes in calls to the database when the pool gets starved. We've been having oddball load spikes that don't seem to have any relation to server load. I suspect that he is not correctly managing the lifecycle on the connections to Northscale and that we are periodically experiencing starvation in the socket pool as a result, but I'm unable to prove it.

Is there a specific exception I should be looking for when I call the Get method to retrieve items from cache? I'm not really seeing much in the docs that gives me sufficient information on this. Anybody have any sample code on this? I'd even accept java or php code, as I think the .NET libraries were probably based on one of those anyway.

Any ideas?

Thanks,
Will

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

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

发布评论

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

评论(1

牵你的手,一向走下去 2024-12-10 17:03:05

如果您已正确连接到 membase 服务器(以前称为 Northscale),通常您只会在未命中时在“get”上收到异常。

If you have made the connection correctly to the membase server(formerly Northscale) typically you only get an exception on 'get' when it's not a hit.

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