<span id="mktg5"></span>

<i id="mktg5"><meter id="mktg5"></meter></i>

        <label id="mktg5"><meter id="mktg5"></meter></label>
        最新文章專題視頻專題問答1問答10問答100問答1000問答2000關鍵字專題1關鍵字專題50關鍵字專題500關鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關鍵字專題關鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
        問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
        當前位置: 首頁 - 科技 - 知識百科 - 正文

        Issuerecord:“Nothreadforsocket”aboutMemcach

        來源:懂視網 責編:小采 時間:2020-11-09 13:21:15
        文檔

        Issuerecord:“Nothreadforsocket”aboutMemcach

        Issuerecord:NothreadforsocketaboutMemcach:文章系本人原創,轉載請保持完整性并注明出自《四火的嘮叨》 We own a service supplying not-real-time data to the downstream clients. In order to reduce the average latency and the pressure on datab
        推薦度:
        導讀Issuerecord:NothreadforsocketaboutMemcach:文章系本人原創,轉載請保持完整性并注明出自《四火的嘮叨》 We own a service supplying not-real-time data to the downstream clients. In order to reduce the average latency and the pressure on datab

        文章系本人原創,轉載請保持完整性并注明出自《四火的嘮叨》 We own a service supplying not-real-time data to the downstream clients. In order to reduce the average latency and the pressure on database, Memcached was imported as the cluster ce

        文章系本人原創,轉載請保持完整性并注明出自《四火的嘮叨》

        Issue record: No thread for socket about MemcachedWe own a service supplying not-real-time data to the downstream clients. In order to reduce the average latency and the pressure on database, Memcached was imported as the cluster center cache, and our service consumed it. I encountered an issue when Memcached was firstly deployed on production environment:

        [WARN] (Acceptor ServerSocket[addr=/0.0.0.0,port=0,localport=3961]) amazon.platform.servertoolkit.http.jetty.JettyServerManager: No thread for Socket[addr=/10.0.77.98,port=10545,localport=3961] : [Acceptor ServerSocket[addr=/0.0.0.0,port=0,localport=3961]]org.mortbay.util.ThreadPool.run(ThreadPool.java:350)

        The server totally gave no response. So I checked the connection number:

        netstat -an | grep ESTABLISHED | wc –l
        54

        And process number:

        ps -ef|wc -l
        564
        

        The both seemed normal. One teammate remaindered me I should have a look at the threads of Jetty:

        ps uH p 31636 | wc -l

        I couldn’t find anything abnormal. I knew I might increase the thread up limit but that would not have any help to resolve the issue, at most it might only delay the issue’s happening.

        Actually, this issue was a little more complex than we thought indeed.

        The threads were running out from this morning, and client could not connect to our service. I took a snapshot (jstack -F -l 31636) for the stacks in JVM, finding that almost all the threads were hung reading from cache server:

        Thread 19795: (state = IN_NATIVE)
         - sun.nio.ch.FileDispatcher.read0(java.io.FileDescriptor, long, int) @bci=0 (Compiled frame; information may be imprecise)
         - sun.nio.ch.SocketDispatcher.read(java.io.FileDescriptor, long, int) @bci=4, line=21 (Compiled frame)
         - sun.nio.ch.IOUtil.readIntoNativeBuffer(java.io.FileDescriptor, java.nio.ByteBuffer, long, sun.nio.ch.NativeDispatcher, java.lang.Object) @bci=116, line=198 (Compiled frame)
         - sun.nio.ch.IOUtil.read(java.io.FileDescriptor, java.nio.ByteBuffer, long, sun.nio.ch.NativeDispatcher, java.lang.Object) @bci=31, line=166 (Compiled frame)
         - sun.nio.ch.SocketChannelImpl.read(java.nio.ByteBuffer) @bci=101, line=245 (Compiled frame)
         - com.schooner.MemCached.SockInputStream.readFromChannel() @bci=25 (Interpreted frame)
         - com.schooner.MemCached.SockInputStream.read() @bci=31 (Compiled frame)
         - com.schooner.MemCached.SockInputStream.getLine() @bci=9 (Compiled frame)
         - com.schooner.MemCached.AscIIClient.get(java.lang.String, java.lang.String, java.lang.Integer, boolean) @bci=583 (Compiled frame)
         - com.schooner.MemCached.AscIIClient.get(java.lang.String, java.lang.Integer) @bci=6 (Compiled frame)
         - com.schooner.MemCached.AscIIClient.get(java.lang.String) @bci=3 (Compiled frame)
         - com.danga.MemCached.MemCachedClient.get(java.lang.String) @bci=5 (Compiled frame)
         - amazon.forecast.util.cache.memcached.BSFMemcachedClient.get(java.lang.String, java.lang.String) @bci=14, line=80 (Compiled frame)
         - amazon.forecast.distribution.Forecaster.getForecastDistributions(amazon.forecast.distribution.IForecastDistributionProvider, amazon.forecast.distribution.ForecastRequest)
         ...

        On my understanding there should be some error on the connection from the client to cache server, then I checked the cache server but found it’s correctly and stably running, and of course, the network was good. We invoked?Memcached service manually several times thru telnet, it did work normally.?I took several snapshots in series again and got the same result — it seemed all the threads were being hung on the “read0″ method.

        However, after restarting the client the issue disappeared. By then nothing could explain why all the threads were being hung reading from cache server. One of my teammate told me if the tcp connection was dropped and the client was trying to read, it would not fail until the retransmission time out. The retransmission would happen in a back-off manner, and it would take long time for “read” to fail. Besides,?It didn’t matter whether or not we were able to connect to the cache server. The exact tcp connection was broken on client, and it didn’t detect and was still using the broken socket to read.

        Finally, we were still unclear about the root cause, but found a loop discussing about this issue:?

        https://github.com/gwhalin/Memcached-Java-Client/issues/20

        A working solution is to set socket timeout to release the connection in time if unforeseen issue happens.

        文章系本人原創,轉載請保持完整性并注明出自《四火的嘮叨》

        你可能也喜歡:

        聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

        文檔

        Issuerecord:“Nothreadforsocket”aboutMemcach

        Issuerecord:NothreadforsocketaboutMemcach:文章系本人原創,轉載請保持完整性并注明出自《四火的嘮叨》 We own a service supplying not-real-time data to the downstream clients. In order to reduce the average latency and the pressure on datab
        推薦度:
        標簽: record for socket
        • 熱門焦點

        最新推薦

        猜你喜歡

        熱門推薦

        專題
        Top
        主站蜘蛛池模板: 国产亚洲精品资源在线26u| 国产大片51精品免费观看| 亚洲av成人一区二区三区观看在线 | 亚洲综合激情九月婷婷| 亚洲欧美日韩中文无线码| 国色精品卡一卡2卡3卡4卡免费| 亚洲色图综合在线| 狠狠色伊人亚洲综合网站色| 国产福利在线观看永久免费| 亚洲欧洲一区二区三区| 国产精品免费看久久久香蕉 | 亚洲午夜无码片在线观看影院猛| 高潮毛片无遮挡高清免费| 7x7x7x免费在线观看| 青青草原精品国产亚洲av| 国产精品美女久久久免费| 日本亚洲视频在线| 一道本不卡免费视频| 国产成人综合亚洲AV第一页| 999zyz**站免费毛片| 精品亚洲A∨无码一区二区三区| 4hu四虎最新免费地址| 亚洲国产成人精品不卡青青草原| 美女被免费网站在线视频免费| 亚洲熟伦熟女新五十路熟妇| 成在人线av无码免费高潮水| 免费a级毛片无码a∨性按摩| 亚洲一久久久久久久久| 男人的天堂亚洲一区二区三区 | 日韩毛片免费一二三| 成年男女免费视频网站| 4480yy私人影院亚洲| 在线播放免费人成视频在线观看| 久久精品国产亚洲av麻豆蜜芽| 4399影视免费观看高清直播| 伊人久久亚洲综合影院首页| 亚洲精品尤物yw在线影院| 一级做a爰全过程免费视频| 亚洲国产成人久久一区二区三区 | 99在线精品免费视频九九视| 激情吃奶吻胸免费视频xxxx|