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…
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.
Customer surveys are for companies who didn't pay proper attention to begin with.
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 !
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.