Memcache_connect 连接超时
我在 1 秒内收到了 10 到 20 个这样的错误:
Memcache_connect 连接超时
这种情况每天会发生几次,在一台每日活跃用户数约为 2500、内存为 1GB 的服务器上。我不认为服务器正在交换。大多数时候,内存利用率低于 75%,CPU 利用率低于 25%。平均负载通常小于 9。我按照此处的调试说明进行操作:http://code .google.com/p/memcached/wiki/Timeouts
这是我的内存缓存统计信息:
stats
STAT pid 15365
STAT uptime 173776
STAT time 1329157234
STAT version 1.2.8
STAT pointer_size 32
STAT rusage_user 1171.316354
STAT rusage_system 7046.435826
STAT curr_items 28494
STAT total_items 4039745
STAT bytes 3371127
STAT curr_connections 36
STAT total_connections 102206685
STAT connection_structures 328
STAT cmd_flush 0
STAT cmd_get 73532547
STAT cmd_set 4039745
STAT get_hits 40779162
STAT get_misses 32753385
STAT evictions 0
STAT bytes_read 2153565193
STAT bytes_written 38768040520
STAT limit_maxbytes 67108864
STAT threads 2
STAT accepting_conns 1
STAT listen_disabled_num 0
我的假设是我用完了 TIME_WAIT 存储桶:
netstat -n | grep TIME_WAIT | wc -l
51892
但我不知道这是否太高。 我在 Solaris 上(在 Joyent 服务器上),tcp_time_wait_interval
设置为 60000。其他一些阅读建议将此设置减少到 30000 或 15000。但这似乎不是一个可扩展的解决方案我。
我怎么知道它的存储桶已用完?我应该增加 TIME_WAIT 桶的数量吗?如果是这样,怎么办?
I get 10 to 20 of these errors all within 1 second of each other:
Memcache_connect Connection timed out
This happens several times a day, on a server with about 2500 daily active users, 1GB of ram. I don't think the server is swapping. Most of the time, I'm at less then 75% memory utilization, and less then 25% CPU utilization. The load averages are usually less then 9. I followed the debugging instructions here: http://code.google.com/p/memcached/wiki/Timeouts
Here are my memcache stats:
stats
STAT pid 15365
STAT uptime 173776
STAT time 1329157234
STAT version 1.2.8
STAT pointer_size 32
STAT rusage_user 1171.316354
STAT rusage_system 7046.435826
STAT curr_items 28494
STAT total_items 4039745
STAT bytes 3371127
STAT curr_connections 36
STAT total_connections 102206685
STAT connection_structures 328
STAT cmd_flush 0
STAT cmd_get 73532547
STAT cmd_set 4039745
STAT get_hits 40779162
STAT get_misses 32753385
STAT evictions 0
STAT bytes_read 2153565193
STAT bytes_written 38768040520
STAT limit_maxbytes 67108864
STAT threads 2
STAT accepting_conns 1
STAT listen_disabled_num 0
My hypothesis is that I'm running out of TIME_WAIT buckets:
netstat -n | grep TIME_WAIT | wc -l
51892
But I don't know if that's too high or not.
I'm on Solaris (on the Joyent servers) and the tcp_time_wait_interval
is set to 60000. Some other readings suggested decreasing this setting to 30000, or 15000. But this doesn't seem like a scalable solution to me.
How do I know that it's running out of buckets? Should i increase the number of TIME_WAIT buckets? if so, how?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论