[网站日志]当Memcached缓存服务挂掉时性能监视器中的表现

我们用的Memcached缓存服务是阿里云OCS,今天晚上遇到了一次OCS挂掉的情况(计划中的升级),看一下性能监视器中的表现,也许对分析黑色1秒问题有帮助。

应用日志中错误:

2014-06-05 20:44:55,747 [ERROR] Enyim.Caching.Memcached.MemcachedNode
System.IO.IOException: 无法从传输连接中读取数据: 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。。
    ---> System.Net.Sockets.SocketException: 
   由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。
   在 System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   --- 内部异常堆栈跟踪的结尾 ---
   在 System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   在 System.IO.BufferedStream.Read(Byte[] array, Int32 offset, Int32 count)
   在 System.IO.BinaryReader.ReadBytes(Int32 count)
   在 Enyim.Caching.Memcached.PooledSocket.ReadBytes(Int32 count)
   在 Enyim.Caching.Memcached.Protocol.Binary.BinaryResponse.Read(PooledSocket socket)
   在 Enyim.Caching.Memcached.Protocol.Binary.BinarySingleItemOperation.ReadResponse(PooledSocket socket)
   在 Enyim.Caching.Memcached.MemcachedNode.ExecuteOperation(IOperation op)

1. ASP.NET\Requests Current飙高

2. ASP.NET\Requests Queued飙高

3. CPU上升

4. QPS下降

5. Web Service\Current Connections飙高

从中得到的启发:如果应用程序的代码执行中出现阻塞,会造成Requests Queued上升。

刚才在另外一台服务器上看到这样的表现,对照着时间到应用日志中一查,果然也是缓存服务挂掉了。

而“黑色1秒”期间很少出现Requests Queued上升的情况,说明在应用程序代码的执行中并没有出现阻塞。

posted @ 2014-06-05 21:34  博客园团队  阅读(2327)  评论(1编辑  收藏  举报