[hotjoe.com] HotJoe Java Help Forums
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Visit java.com
Please send email if you are having login problems - see the posts below for more info.
Hotmail and Yahoo! users - please see the Hotmail post or the Yahoo! post for information on lost emails.
Application creates huge number of threads  XML
Forum Index » J2EE Application Development
Author Message
karl

Newbie

Joined: 01/07/2006 07:56:42
Messages: 38
Offline

I have a multithreaded java application which on running more than a day creates a huge number of threads in the system and consumes a lot of system resources than expected.
Not able to figure out where the problem is?
Application uses java1.5 and runs on Windows2003 server.
stdunbar

Newbie
[Avatar]

Joined: 06/22/2005 14:51:37
Messages: 849
Location: Superior, CO, USA
Offline

Does it create Java threads or are these Windows O/S threads? Java can handle having thousands of threads and Windows handles it ok too. But it would help to know a bit more about the application. What does it do? Is it something you have the source to? If so you may want to use a tool to do some instrumentation on the code to see where the resources are being used.

Thanks for using the forums at hotjoe.com
[WWW] [Yahoo!] [ICQ]
karl

Newbie

Joined: 01/07/2006 07:56:42
Messages: 38
Offline

It creates java threads.
I have the source of the application.
Jobs are submitted to my application through a client with a pre-defined input rate.My application processes the jobs ,throws the desired output as requested by user.
When i reduce the job submisssion rate my application works fine.
I feel the problem is in my application rather than submission rate of client.
Previously my application was working fine,after a few bug fixes in my application this problem is see.Not able to narrow down where or which fix caused the application to behave like this.
Ready to give further info if required.


stdunbar

Newbie
[Avatar]

Joined: 06/22/2005 14:51:37
Messages: 849
Location: Superior, CO, USA
Offline

Perhaps there needs to be a throttle on the number of threads created. Basically if there are too many threads then the server does not accept any more work. But if it was working before then I'd start with the code that was changed and see what was broken.

Thanks for using the forums at hotjoe.com
[WWW] [Yahoo!] [ICQ]
karl

Newbie

Joined: 01/07/2006 07:56:42
Messages: 38
Offline

There is no bound on the no. of threads my application creates.
Getting back to the fix which created the problem is probably difficult,b'coz huge no. of fixes have gone into my application in the past few months.
karl

Newbie

Joined: 01/07/2006 07:56:42
Messages: 38
Offline

My application calls a batch script for every job submitted using the runtime.exec(), while doing processing. The batch script contains several CLI commands(java.exe <options> which it executes.
I doubt the runtime.exec() is taking more time in the later stages than the initial stages. It might be creating huge no. of child processes,which over a period of time is resulting in jobs clogging.

 
Forum Index » J2EE Application Development
Go to:   
Powered by JForum 2.1.9 © JForum Team
This site run by Scott Dunbar of Xigole Systems. © 2005-2011 - Scott Dunbar
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners
hotjoe.com, xigole.com, and Scott Dunbar have no affiliation with Oracle