Why do my client invocations hang?

Under heavy load or when using callbacks, sometimes client invocations hang and do not complete. The most likely cause is that the server is running out of threads. The server-side thread pool by default contains a single thread, which permits one level of nested callback. If you have callbacks that are nested more deeply, you must increase the size of the server-side thread pool accordingly. (One additional thread is required for each additional level of nested callback.)

Note that the server can emit a warning with the Ice.ThreadPool.Server.SizeWarn property if it uses more than the specified number of threads. The Ice thread pool grows and shrinks dynamically, with the Ice.ThreadPool.Server.Size property controlling the initial number of threads, and the Ice.ThreadPool.Server.SizeMax property controlling the maximum number of threads that the pool may create.

If the problem does not appear to be related to a lack of threads, attach a debugger to the server process and examine the stack trace of each active thread.

See Also