[Logo] Terracotta Discussion Forums
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Messages posted by: nilishah  XML
Profile for nilishah -> Messages posted by nilishah [31] Go to Page: 1, 2, 3 Next 
Author Message
Hi,

We have a requirement from our current project where we need to set up calendar with certain dates. Then Quartz scheduler needs to pick up that calendar dates and executes the jobs.

The idea is if we decide to change any date in that calendar, it should be at one central place, rather than updating/rescheduling about 600 jobs to new calendar schedule.

As I read on quartz calendar, I got to know that it is useful only for excluding some dates, but not sure how can we use it set/include only certain dates.

For eg. We want to set calendar for every week Monday 7 pm, every week Tuesday at 8 pm, or Monthly calendar with dates - 4th March 7 pm, 12th March 8 pm, 19th march 7 pm, 24th March at 6 pm.

Your quick response will help me.

Thanks,
Nili
Thanks for responding.

I know we can make use of priority, but in our case all of these jobs are equal priority and we have other service which can then control the resources of these simultaneous jobs.

What we have observed - Quartz pick up triggers in alphabetical order of trigger_name if all triggers are scheduled at exact same time with priority 5.

What we would like to know, if Quartz in any way can randomize these behavior of picking up trigger in alphabetical order?

I would really appreciate your response.

Thanks,
Nili
Hi,

I would really appreciate if I can get some kind of solution in Quartz which can pick up jobs randomly if all jobs are scheduled at the same time.

I have fix the issue in production as early as possible.


Can someone please answer?

thanks,
Nili
Hi,

We are heavily using Quartz scheduler in our application and recently we are facing one issue.

Issue: We have around 500 triggers that are scheduled exactly at the same time 7 pm and all these triggers kick off one quartz job. What we have observed that quartz scheduler picks up these triggers in alphabetical order. Can you please confirm if that is the case and quartz will pick up in alphabetical order only?

If that is the case, is there a way in quartz configuration to set up random pick up of those triggers?

quick response will be really appreciated as we are facing issue in production.

Thanks,
Nili
Hi,

I have updated to quartz 2.1.5 jar and it did work for me. I do not see any deadlocks on quartz tables.

We are using SQL server 2008.

Please confirm if the below list of bugs have fixed the deadlock issue or not.

quartz 2.0.2 - QTZ-164
quartz- 2.1 - QTZ-182


We are currently using quartz 2.0.1. When I updated to 2.1.5, I do not need to make any changes in code or behaviour of scheduler.

Please confirm that this update will not affect existing behaviour with 2.0.1 version.

Thanks,
nili
Hi,

I have tried with quartz-2.1.5.jar file and I still see deadlocks on quartz tables.

Here is the exception/stack trace

[2012-11-27 15:25:34,854]ERROR - [org.quartz.core.ErrorLogger] - An error occurred while scanning for the next triggers to fire.
org.quartz.JobPersistenceException: Couldn't acquire next trigger: Couldn't retrieve trigger: Transaction (Process ID 232) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. [See nested exception: org.quartz.JobPersistenceException: Couldn't retrieve trigger: Transaction (Process ID 232) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. [See nested exception: com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 232) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.]]
at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2840)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$41.execute(JobStoreSupport.java:2755)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3811)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTriggers(JobStoreSupport.java:2751)
at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:264)
Caused by: org.quartz.JobPersistenceException: Couldn't retrieve trigger: Transaction (Process ID 232) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. [See nested exception: com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 232) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.]
at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveTrigger(JobStoreSupport.java:1524)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2790)
... 4 more
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 232) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:196)
at com.microsoft.sqlserver.jdbc.SQLServerResultSet$FetchBuffer.nextRow(SQLServerResultSet.java:4700)
at com.microsoft.sqlserver.jdbc.SQLServerResultSet.fetchBufferNext(SQLServerResultSet.java:1683)
at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:956)
at com.mchange.v2.c3p0.impl.NewProxyResultSet.next(NewProxyResultSet.java:2859)
at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectTrigger(StdJDBCDelegate.java:1747)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveTrigger(JobStoreSupport.java:1520)
... 5 more



Please help me on this issue.

thanks,
Nili
Hi Karthik,

Your response will be appreciated. We are seeing lots of deadlocks on qrtz_triggers and qrtz_cron_triggers table while selecting.

Our current version of quartz is 2.0.1.

If I upgrade to latest version, how is it going to affect our existing application?

Thanks,
Nili
Hi,

While researching on your forum, I could find out that if I set the following setting to true, it should remove the deadlock.

org.quartz.jobStore.acquireTriggersWithinLock

But, I am not sure that if this setting required to be true with quartz 2.1.

Please help me out understand this solution better.

Thanks,
Nili
Hi,

Can you please give me some explaination how new version quartz 2.1.5 will help with deadlock?

I have gone through the chnagelist from the link you have given me, but could not figure out where did it solve deadlock issue.


It is very critical that we fix this issue in our production, but it will be very difficult for me to change to new version without even giving the right reason.

Also, if I update it to latest, will that affect in our existing coding/api or existing triggers.?

Your prompt response will be appreciated.

Thanks,
Nili
Can you tell me the difference between this 2 versions? How does it help with deadlock situation?

It is not easy to just change version in production for our application.

Thanks,
Nili
Yes. That is correct. But what if we have 300 jobs that are scheduled to be run at the exact same time and if I have only 10 threads. Quartz will pick up first 10 jobs by each thread and as and when thread gets available it will pick up next job.

But during this, deadlocks happens. I have tried with 5 ,2 and 1 thread and it is not very consistent. Sometimes deadlock happens, while other time it does not happen.

Here is the deadlock that i get from quartz table. We still see deadlock in our tables at the same time.

[Timestamp (Local)]: 11/1/2012 1:20:19 PM [Timestamp (UTC)]: 11/1/2012 8:20:19 PM [Generated By]: SQL Sentry 7.1 Server [INF-MISC-SJC-31]
[Version]: 7.1.46.0
[Monitor Type]: SqlServerProfiler
[Condition]: SQL Server: Deadlock
[Response Ruleset]: Notify Every Time (default)
----------------------------------------------------------------------
[Deadlock Victim Information]:
SPID [ecid]: 331 [0]
Host: QATOOLS-DEV-01
Application: Microsoft SQL Server JDBC Driver
Database: auto_tmp
Login: FEI\qa_auto
Log Used: 348
Deadlock Priority: 0
Wait Time: 1361
Transaction Start Time: 11/1/2012 1:20:16 PM Last Batch Start Time: 11/1/2012 1:20:16 PM Last Batch Completion Time: 11/1/2012 1:20:16 PM
Mode/Type: S
Status: suspended
Isolation Level: read committed (2)
Text Data:
SELECT * FROM QRTZ_CRON_TRIGGERS WHERE SCHED_NAME = 'Tools Job Scheduler' AND TRIGGER_NAME = @P0 AND TRIGGER_GROUP = @P1 Client Options 2: 128058 Client Options 1: 671088672 Is Victim: True Wait Resource: KEY: 18:72057594451918848 (ea604dc1a02d) Transaction Count: 0 Lock Timeout: 4294967295
SPID: 331
ECID: 0
Transaction ID: 1008207169
Transaction Name: implicit_transaction
Database ID: 18
I am using Quartz 2.1 version

Thanks,
Nili
Hi,

We are recently facing deadlock siutation while executing about 200 jobs simultaneously.

I have configured Quartz thread count = 10
and we have about 200 process/jobs kicks off by scheduler at the same time. These jobs does some updates in 2 DB tables.

We are seeing deadlocks on Quartz tables.

I have 2 questions?
1. How can I determine the size of thread count?
2. Is there a way to set the interval in each thread? What I mean to say that set the interval between 2 threads.
3. I have set the misfireThreshold = 60 sec. How does this going to effect if scheduler is going to kick off 200 jobs simultaneously.

I would appreciate your quick response.

Thanks,
Nili
Hi,

I would like to know how can I get history of all fired triggers. Does quartz store somewhere in quartz tables?

Can you point me some examples?

thanks,
Nili
Here is my quartz.properties

SCHEDULER_THREAD_POOL_SIZE=10
SCHEDULER_MISFIRE_THRESHOLD=6000
SCHEDULER_DATA_SOURCE=myDS
SCHEDULER_TABLE_PREFIX=QRTZ_
DRIVER_DELEGATE_CLASS=org.quartz.impl.jdbcjobstore.MSSQLDelegate

Can you help me out how can these triggers will be fired by main scheduler rather than misfire thread.

Thanks,
Nili
 
Profile for nilishah -> Messages posted by nilishah [31] Go to Page: 1, 2, 3 Next 
Go to:   
Powered by JForum 2.1.7 © JForum Team