4 Replies Latest reply on Aug 9, 2004 4:33 PM by chuckharris

    jndi lookups fail (under load)

    mlange

      Problem: many clients to try lookup a session bean concurrently. If the client count reaches a certain number, the lookup fails with:

      [java] javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]
      [java] at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1119)
      [java] at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1196)
      [java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:516)
      [java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:509)
      [java] at javax.naming.InitialContext.lookup(InitialContext.java:347)

      Setting the "backlog" param of the naming service to a higher value does not have any effect.

      Is there any workaround to avoid this? Otherwise it is not possible to access EJBs from many clients.

      Thanks,

      marek

        • 1. Re: jndi lookups fail (under load)
          darranl

          How many clients do you have?

          • 2. Re: jndi lookups fail (under load)
            mlange

            The error seems to occur when more than 20 clients access the server.

            • 3. Re: jndi lookups fail (under load)
              ibudhou

              Hi
              colud you solve the problem? I am also having the same problem.
              If its done , pls advise solution.

              • 4. Re: jndi lookups fail (under load)
                chuckharris

                I am getting the same exception while experimenting with the sun ejb tutorial. I get the error with 14+ clients. Did you find a solution?
                javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive
                timed out]
                at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1119)
                at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1196)
                at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:516)
                at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:509)
                at javax.naming.InitialContext.lookup(InitialContext.java:347)
                at ejb.stateless.ConverterClient.run(Unknown Source)
                at java.lang.Thread.run(Thread.java:534)
                Caused by: java.net.SocketTimeoutException: Receive timed out
                at java.net.PlainDatagramSocketImpl.peekData(Native Method)
                at java.net.DatagramSocket.receive(DatagramSocket.java:661)
                at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1089)
                ... 6 more