Home Help Center

Threads don't die and continue to create if server is down

ywtsangywtsang Member Yiu WingOrganization: yesasiaProject: search engine
we run client on tomcat 6, sending request to an ice server

we have configured ThreadPool to have multiple threads serving ice requests

if our ice server is down (e.g. down for deployment, network problemt, etc), we find that the client threads don't die, but create a new set of threads, and this repeats, and result in many threads are created until the server is up again

eventually, many threads (we have experienced more than 1000+ or more that may even halt the whole OS) are spawned, all those threads are with stack trace like:

Stack trace:
java.lang.Object.wait(Native Method)

those spwaned threads are alive and have names that are duplicated

so we suspect that threads cannot die gracefully and ice still keep creating new threads

we cannot prevent the ice server to die, any suggestion for this problem?


  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    The Ice run time will not add more threads to the thread pool once the maximum thread pool size is reached. What value are you using for Ice.ThreadPool.Client.SizeMax?

    By the way, when asking for help, please always specify the version of Ice that you're using, along with the language(s), compiler(s), and operating system(s).

  • ywtsangywtsang Member Yiu WingOrganization: yesasiaProject: search engine
    we set both
    to the same value

    both server and client are
    - using java
    - running on linux (server = 32bit, client = 64bit)

    server is using
    (by running slice2java -v)

    client is using the following jar:


    server compiler (by running gcc -v):
    Reading specs from /usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3/specs
    Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --host=x86_64-redhat-linux
    Thread model: posix
    gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-53)

    please let me know if you want more information, many thanks

    p.s. for now, we want to have some quick fixes instead of "upgrade" ice if necessary as we may have some restrictions (time limit) to upgrade ice

    very apprepricate i can get quick response here
Sign In or Register to comment.