[jacorb-developer] Running out of Threads

Wagner, Marcus (Marcus) marcuswagner at avaya.com
Fri Jan 31 13:54:57 CET 2014


Hi,

I have a CORBA Server using JacORB (actually 2.3.1). In general, the server offers some CORBA Objects. Clients work with them and while doing that, they will register CORBA Objects as callback at the server. This is used to push events from the server to clients. So in the end the server is from a CORBA point of view a server and a client. But In the further text when I write server, I mean the server process and when I write client I mean the client application.

Now the problem is, that after a few weeks in operation, there is a Thread Pool running out of idle Threads. I get the error "no idle threads but maximum number of threads reached". As the amount of Threads mentioned is 1000. It needs to be whether the server receptor threads or the client receptor threads (maybe?).

When I make a Thread dump of the system, then there are a lot of "ClientMessageReceptor" Threads. (At the dump time about 850). So I assume, that the affected ThreadPool is the client receptor thread pool. Is this assumption any good?

Next I am wondering why those threads does not become idle. A Stack trace of one of those WAITING Threads looks like:
Thread#900433 "ClientMessageReceptor728" WAITING on java.lang.Object at 7938f
blocked/waiting: 94/2
  java.lang.Object.wait(Native Method)
  java.lang.Object.wait(Object.java:485)
  org.jacorb.orb.giop.GIOPConnection.waitUntilConnected(GIOPConnection.java:285)
  org.jacorb.orb.giop.GIOPConnection.getMessage(GIOPConnection.java:325)
  org.jacorb.orb.giop.GIOPConnection.receiveMessages(GIOPConnection.java:475)
  org.jacorb.orb.giop.MessageReceptor.doWork(MessageReceptor.java:71)
  org.jacorb.util.threadpool.ConsumerTie.run(ConsumerTie.java:61)
  java.lang.Thread.run(Thread.java:662)

My questions here are:
The client receptor threads, when are they required/used. Is it when a Client calls a method on the server?
What connection is the Thread actually waiting for in "org.jacorb.orb.giop.GIOPConnection.waitUntilConnected(GIOPConnection.java:285)"?
Does this thread wait for an incoming CORBA method call? Or does the thread wait for an answer to a remote call he has issued to the client?


Thanks in advance



More information about the jacorb-developer mailing list