Win a copy of Fixing your Scrum this week in the Agile forum!
  • 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
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Quartz scheduler stopped in tomcat

 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Saloon Keeper
Posts: 24174
165
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Saloon Keeper
Posts: 24174
165
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
I am Arthur, King of the Britons. And this is a tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic