2017-04-08 114 views
0

在野外捕獲該隨機異常:SETNX超時與StackExchange.Redis

System.Web.HttpUnhandledException(0X80004005):類型 'System.Web.HttpUnhandledException' 引發的異常。 ---> System.TimeoutException:執行SETNX的超時 GeoIP。[刪除],inst:1,mgr:非活動,err:從不,隊列:2, qu:0,qs:2,qc:0,wr: 0,wq:0,in:0,ar:0,clientName: PRD-VM-WEB-1,serverEndpoint: 未指定/ [刪除] .redis.cache.windows.net:6380,keyHashSlot: 3519,IOCP :(忙= 0,空閒= 1000,最小= 2,最大= 1000),工作者: (忙= 1,空閒= 32766,最小= 2,最大= 32767),本地CPU:不可用(請 看在本文一些常見客戶端的問題的是 可以導致超時:在 StackExchange.Redis.ConnectionMultiplexer.ExecuteSyncImpl [T](消息 https://github.com/StackExchange/StackExchange.Redis/tree/master/Docs/Timeouts.md)消息,ResultProcessor 1 processor, ServerEndPoint server) at StackExchange.Redis.RedisBase.ExecuteSync[T](Message message, ResultProcessor 1處理器,ServerEndPoint服務器)

使用StackExchange.Redis,部署在Azure上。

從我能從referenced cached document得知它看起來不錯,或許Local-CPU不可用的值是問題?

有沒有人知道可能導致這種情況?

回答

0

當您查看收到的錯誤時,是否看到BUSY值大於IOCP或輔助線程池的MIN的任何超時錯誤?如果是這樣,線程池節流可能是原因。這通常發生在突發情況下。這通常伴隨着高CPU,這也會導致超時。線程池節流在這裏解釋:https://gist.github.com/JonCole/e65411214030f0d823cb#file-threadpool-md

另外,這裏有一些最佳實踐:https://gist.github.com/JonCole/925630df72be1351b21440625ff2671f#best-practices-for-azure-redis