Initialization time

Help
2002-10-16
2002-11-26
  • Emmanuel Bourg

    Emmanuel Bourg - 2002-10-16

    I have a consistent initialization time of 2 minutes on starting a MessageServer from a servlet, the CPU isn't much used though. What causes this long delay, is there a way to reduce it ?

     
    • Emmanuel Bourg

      Emmanuel Bourg - 2002-10-17

      It seems this is caused by java.nio, the first call to Selector.open() blocks for 2 minutes

      "main" prio=5 tid=0x007611F0 nid=0x17a runnable [6f000..6fc3c]
              at sun.nio.ch.IOUtil.randomBytes(Native Method)
              at sun.nio.ch.PipeImpl.<clinit>(PipeImpl.java:42)
              at sun.nio.ch.SelectorProviderImpl.openPipe(SelectorProviderImpl.java:27)
              at java.nio.channels.Pipe.open(Pipe.java:133)
              at sun.nio.ch.WindowsSelectorImpl.<init>(WindowsSelectorImpl.java:100)
              at sun.nio.ch.WindowsSelectorProvider.openSelector(WindowsSelectorProvider.java:26)
              at java.nio.channels.Selector.open(Selector.java:209)
              at com.ubermq.jms.server.MessageServer.exec(MessageServer.java:63)
              at StartJMS.main(StartJMS.java:26)

       
      • Emmanuel Bourg

        Emmanuel Bourg - 2002-10-18

        More annoying, i experience the same issue on creating a TopicConnection, it's still blocking on Selector.open().

                at sun.nio.ch.IOUtil.randomBytes(Native Method)
                at sun.nio.ch.PipeImpl.<clinit>(PipeImpl.java:42)
                at sun.nio.ch.SelectorProviderImpl.openPipe(SelectorProviderImpl.java:27)
                at java.nio.channels.Pipe.open(Pipe.java:133)
                at sun.nio.ch.WindowsSelectorImpl.<init>(WindowsSelectorImpl.java:100)
                at sun.nio.ch.WindowsSelectorProvider.openSelector(WindowsSelectorProvider.java:26)
                at java.nio.channels.Selector.open(Selector.java:209)
                at com.ubermq.jms.client.impl.AbstractClientSession.<clinit>(AbstractClientSession.java:37)
                at com.ubermq.jms.client.unicast.UnicastTopicConnection.<init>(UnicastTopicConnection.java:81)
                at com.ubermq.jms.client.unicast.UnicastTopicConnection.<init>(UnicastTopicConnection.java:53)
                at com.ubermq.jms.client.UnicastTopicConnectionFactory.createTopicConnection(UnicastTopicConnectionFactory.java:50)

         
    • Jimmy P

      Jimmy P - 2002-10-17

      hello, i have never seen this behavior before, even on windows. i can't imagine what could be causing this??

      i will look into the NIO bug parade and see if there's any mention of this behavior. obviously a two minute block is unacceptable.

       
    • Mahadevan G S  S

      Mahadevan G S S - 2002-11-23

      Is it due to  DNS querying

       
    • Mahadevan G S  S

      Mahadevan G S S - 2002-11-23

      It may not be dueot DNS aswe are dealing with pipes. What version of JDK isbeing used ?
      I havenot found any native method named randomBytes in  sun.nio.ch.IOUtil.class

       
      • Emmanuel Bourg

        Emmanuel Bourg - 2002-11-26

        That was with the Sun JDK 1.4.1 on NT4, btw i moved to Win2k and it
        works fine now.

         

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks