Problem with increasing number of Java threads

  • Thread starter Krzysztof Mazur
  • Start date
K

Krzysztof Mazur

We have 3 Java applications running as servers under Linux (SuSE
8.2/kernel 2.4.20-4GB, 1GB RAM+1GB swap, CPU Intel P4 2.8GHz, Sun Java
1.4.2-b28).
We have also few client-type Java apps running on the system
(frequently, but not always).
First server app creates 49 threads + 2 for every client connected
(under normal circumstances it makes ca. 55-61 threads).
Second app creates ca. 38, and third ca. 11 threads.
The first app creates quite frequently new threads used for client and
closed automatically on clients exit.
If the server running longer -- the threads number increases (we see
this in our logs - the thread number is recorded every 3
minutes). There are *no* exceptions. Then *all* Java apps on the server
start to create new threads but don't terminate the old (unused) ones.
Thread dump shows only the correct number of threads (55-61), pstree and
our log shows constantly increasing number of threads.
At this point we have to reboot the server. Neither restart of the
application nor killing all Java processes helps.
Two times the problem emerged in the middle of the night, when the
logrotate replaced the log file. It's probably only coincidence -- the
system worked already few days (it survived 6-7 changes of log file).
Yesterday the problem emerged in the middle of the day, after only few
hours work.
Last but not least -- we have the system working in almost identical
configuration on other server -- we have no problems at all. During test
phase the system worked few weeks without pause.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top