0
我們使用Netty 3.6.2來處理我們的HTTP請求。在繁忙時間,我們正在觀察OPEN和BOUND事件之間的顯着延遲(35秒)。Netty中的OPEN和BOUND事件之間的巨大延遲
我們已啓用日誌記錄,但日誌中沒有錯誤。以下是我們要求的日誌
New I/O server boss #9 INFO 2014-09-25 17:55:01,844: com.x.core.httpserver.HttpRequestListener Channel Event Received: [id: 0xbd52f223, /0:0:0:0:0:0:0:1:46143 => /0:0:0:0:0:0:0:1:9191] OPEN
New I/O server boss #9 DEBUG 2014-09-25 17:55:01,844: org.jboss.netty.handler.logging.LoggingHandler [id: 0xbd52f223, /0:0:0:0:0:0:0:1:46143 => /0:0:0:0:0:0:0:1:9191] OPEN
New I/O worker #4 INFO 2014-09-25 17:55:36,439: com.x.core.httpserver.HttpRequestListener Channel Event Received: [id: 0xbd52f223, /0:0:0:0:0:0:0:1:46143 => /0:0:0:0:0:0:0:1:9191] BOUND: /0:0:0:0:0:0:0:1:9191
New I/O worker #4 DEBUG 2014-09-25 17:55:36,439: org.jboss.netty.handler.logging.LoggingHandler [id: 0xbd52f223, /0:0:0:0:0:0:0:1:46143 => /0:0:0:0:0:0:0:1:9191] BOUND: /0:0:0:0:0:0:0:1:9191
New I/O worker #4 INFO 2014-09-25 17:55:36,439: com.x.core.httpserver.HttpRequestListener Channel Event Received: [id: 0xbd52f223, /0:0:0:0:0:0:0:1:46143 => /0:0:0:0:0:0:0:1:9191] CONNECTED: /0:0:0:0:0:0:0:1:46143
請看上面的日誌行#2和#3之間的時間差。開放和綁定狀態之間的延遲約爲35秒。任何人都知道爲什麼會發生這種情況?
也許你以某種方式阻止I/O線程? – 2014-10-01 04:39:33
是的。我們正在朝這個方向進行調查。 – 2014-10-01 04:53:06
@NormanMaurer我們不會阻止老闆線程 – 2014-10-01 15:50:45