1 Reply Latest reply on Jul 10, 2003 9:21 PM by Jon Barnett

    Receive Time out on Context Lookup

    raj_sohal Newbie

      Hello

      trying to figure out why when the server is under a load i start getting this exception doing a context lookup to the jboss server (3.0.6).

      javax.naming.CommunicationException: Receive timed out. Root exception is java.io.InterruptedIOException: Receive timed out
      at java.net.PlainDatagramSocketImpl.receive(Native Method)
      at java.net.DatagramSocket.receive(DatagramSocket.java:387)
      at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1042)
      at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1156)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:478)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471)
      at javax.naming.InitialContext.lookup(InitialContext.java:345)

      Is there a way i can increase the timeout value.

      Can any help me with this trace.

      Thanks in advance

      chints

        • 1. Re: Receive Time out on Context Lookup
          Jon Barnett Master

          You could try switching to the timed socket factory and changing the values appropriately:

          jndiProps.setProperty("jnp.socketFactory", "org.jnp.interfaces.TimedSocketFactory");
          jndiProps.setProperty("jnp.timeout", "0");
          jndiProps.setProperty("jnp.sotimeout", "0");

          where jndiProps is the set of properties defined for your inital context for the lookup.

          jnp.timeout is the connection timeout.
          jnp.sotimeout is the read timeout.

          Both are in milliseconds - type int.