6 Replies Latest reply on Oct 16, 2014 10:37 PM by Tomohisa igarashi

    A lot of WARN from NioEventLoop: Selector.select() returned prematurely 512 times in a row; rebuilding selector.

    Tomohisa igarashi Master

      Hi HornetQ experts,

       

      I hit this issue when I tried to use HornetQ 2.4.1 client to connect to the HornetQ running in WildFly 8.1.0.Final with http-upgrade-enabled:

      [SWITCHYARD-2404] HornetQ 2.4.1 client sometimes outputs lots of WARN/INFO - JBoss Issue Tracker

       

      I got lots of following WARN/INFO messages:

      15:38:51,694 WARN [io.netty.channel.nio.NioEventLoop] Selector.select() returned prematurely 512 times in a row; rebuilding selector.

      15:38:51,694 INFO [io.netty.channel.nio.NioEventLoop] Migrated 0 channel(s) to the new Selector.

      15:38:51,694 WARN [io.netty.channel.nio.NioEventLoop] Selector.select() returned prematurely 512 times in a row; rebuilding selector.

      15:38:51,694 INFO [io.netty.channel.nio.NioEventLoop] Migrated 0 channel(s) to the new Selector.

      (...repeating)

       

      It seems to happen only when the javax.jms.Connection.start() is invoked but no message is received. It doesn't happen if I create only one session from that connection and receive at least one message through that session.

       

      I found similar report against netty:

      Netty 4: NioEventLoop strarts friquent (infinit?) selector rebuild on unexpected interruption of it's thread · Issue #24…

      As I described in SWITCHYARD-2404, this issue didn't happen if I overrode the netty version to 4.0.19.Final.

       

      My questions are:

      1) Does this workaround (upgrading netty) sound right? Any side effects come to your mind?

      2) Any plan to upgrade netty version?

      3) Or any other ideas to solve this problem?

       

      Possibly it may not happen if you don't invoke Connection.start() when you don't receive any message, but that's not so convenient for our utility.

       

      Thanks,

      Tomo