Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Thread getting lost  RSS feed

 
Nishant Sahay
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have two application A & B running in two different machine.
A interacts with B using Web Services.
Application B also have a couple of batch processes running in interval of 2 minutes.
We have put extensive debug statements in B application to trace any problems.
Sometimes while processing a request from A, the main thread in Application B gets lost and after waiting for a interval of 5 minutes Appln A throws "java.io.InterruptedIOException: Read timed out" exception.
I feel this maybe becuase of some some thread leakage in the application server becuase of the number of batch processing taking place in Application B and there is Runtime uncatched exception going unnoticed.
Can anyone pls help me out in this? What could be reason behind this and any remedy.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, welcome to the ranch!

Do the batch processes really run inside application B? How do you run them, maybe with timer()? I'd look to see if they accidentally block the client requests, making the main thread look stuck.

Your intuition about an uncaught exception sounds good. Make sure that the run() method of any new thread has a try-catch block for the most generic throwable you can think of and see if something is blowing up.
[ June 09, 2005: Message edited by: Stan James ]
 
Nishant Sahay
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The batch Process gets started at server start up.
There are a total of three batch process running in application B, one in every 2 minutes, second in every 2 hours and the third in every 15 mins.Once the batch processes have run during the server start up we make the thread sleep for the scheduled time.
As of now we are still facing the problem of thread getting lost.
Any help would be really appreciated
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!