Netty中OPEN和BOUND事件之间的巨大延迟

时间:2014-09-30 10:26:16

标签: java netty

我们正在使用Netty 3.6.2来处理我们的HTTP请求。我们正在观看高峰时段OPEN和BOUND事件之间的显着延迟(35秒)。

我们已启用日志记录,但日志中没有错误。以下是我们的请求记录


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秒。任何人都知道为什么会发生这种情况?

1 个答案:

答案 0 :(得分:0)

原来我们阻止了I / O线程。