• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Thread getting lost

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
The fastest and most reliable components of any system are those that are not there. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic