• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Quartz scheduler stopped in tomcat

 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,

I have an issue in Tomcat 7 server. My application uses Quartz scheduler to do a job in every 10 minutes.
Sometimes this job won’t get completed in 10 minutes, and may take a few hours to get completed.
Now I just noticed that after some time (60-70 minutes) my running job get stalled.

When my job was working I could see one job ‘DefaultQuartzScheduler_Worker-0’ is in RUNNABLE state and other 9 threads ‘DefaultQuartzScheduler_Worker-1 to 9’ are in ‘TIMED_WAITING’ state.
But once it stalled then in thread dump I can’t see my running thread ‘DefaultQuartzScheduler_Worker-0’, and other 9 threads still in ‘TIMED_WAITING’

Seems like my thread which was executing this job terminated suddenly.

Anyone got the same issue before? Please let me know if anyone knows how to solve this issue…

Thanks in advance…
 
Bartender
Posts: 11445
18
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One logical place to check would be the logs. Anything there?
 
Jomy George
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Maneesh,

In logs i cant see any error or exception. I can see the job going on smoothly till a point.
Then nothing can see about this job in logs.
 
Bartender
Posts: 20849
125
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Quartz is not a stand-alone scheduler nor a component of the J2EE (Tomcat) server. Every application that uses Quartz has its own instance of Quartz as part of the application. What that means in particular is that when a Quartz thread dies, any stacktrace or other post-mortem information will not automatically show up in the Tomcat logs. Each Tomcat webapp is responsible for its own logging. So you should look in that particular application's logfiles. If the application isn't set up to log, make it do so. It should, anyway. System.out.println isn't good enough.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I am seeing something very similar or even identical. On tomcat, after the quartz scheduler tasks have been running for a week or two, the jobs would just stop running. It's like the scheduler threads all hung or died. So far i have not seen any causes or solution posted on the internet anywhere !
 
Tim Holloway
Bartender
Posts: 20849
125
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Kenubie Wong wrote:Yes, I am seeing something very similar or even identical. On tomcat, after the quartz scheduler tasks have been running for a week or two, the jobs would just stop running. It's like the scheduler threads all hung or died. So far i have not seen any causes or solution posted on the internet anywhere !



I'm not surprised. Tomcat doesn't get involved and Quartz is very reliable, so the cause is almost invariably bugs in the user code and the solution is to debug the code.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!