Memcached php 会话持续增加

发布于 2024-11-03 13:59:28 字数 489 浏览 0 评论 0原文

我运行了由几个应用程序服务器组成的灯堆栈,这些服务器使用单个专用内存缓存服务器来托管会话。问题在于缓存中的项目以几乎线性的速度稳定增长。这让我很担心。我认为当缓存填满时,最旧的条目将被覆盖,应该不会有问题。但似乎不可能深入了解实际使用情况。

我使用的版本如下:

服务器端:

  • Ubuntu 10.04
  • memcached 1.4.2

应用程序端:

  • ubuntu 10.04
  • php 5.3.2
  • libmemcached-0.44
  • pecl memcached 1.0.2

我也尝试过使用pecl memcached 2.0.0b1进行此设置, pecl memcache 2.2.6 并构建libmemcached-0.49 其中只有最后一个影响很小。这种行为是否正常且符合预期,或者这是否是 session_destroy 的失败?

I run a lamp stack of a couple of application servers which used a single dedicated memcache server for hosting sessions. The problem is that the items in the cache increase in a steady almost linear pace. This worries me. I figured that when the cache fills out the oldest entries will be overwritten and there shouldn't be a problem. But it seems impossible to gain any insight in the actual usage.

The versions I use are as following:

server-side:

  • Ubuntu 10.04
  • memcached 1.4.2

application-side:

  • ubuntu 10.04
  • php 5.3.2
  • libmemcached-0.44
  • pecl memcached 1.0.2

I've also tried this setup with pecl memcached 2.0.0b1, pecl memcache 2.2.6 and build against libmemcached-0.49 of which only the last had a minor impact at all. Is this behavior normal and as intended or would this be a failure of session_destroy?

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

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

发布评论

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

评论(1

九八野马 2024-11-10 13:59:28

遗憾的是,正是我自己对 memcached 的误解让我对该行为产生了错误的印象。经过一些额外的研究后,我发现了两个(12) 文章为我澄清了内部工作原理。

垃圾不会被收集。这仍然没有让我了解实际使用情况,但至少消除了一些担忧。只要不被驱逐就应该没问题。

Regrettably it was my own misunderstanding of memcached which gave me a wrong impression about the behavior. After some additional research I came across two (1, 2) articles which clarified the internal workings for me.

Garbage will not be collected. This still doesn't give me insight in the actual usage but at least takes away some worries. As long as I don't get evictions it should be just fine.

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