Quartz Lock Table Query is taking lot of time

87 Views Asked by At

I am new to Quartz Scheduler Framework. We are using it for scheduling purpose which has traffic around 200k requests to be scheduled. The trigger function was little heavy on computation side as it involves 2-3 API calls [sequential].

quartz config:

  liquibase:
    change-log: classpath:/db/changelog/db.changelog-master.yaml
  quartz:
    job-store-type: jdbc
    jdbc:
      initialize-schema: never
    properties:
      org:
        quartz:
          jobStore:
            driverDelegateClass: org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
            isClustered: true
            clusterCheckinInterval: 20000
          threadPool:
            threadCount: ${QUARTZ_THREAD_POOL_COUNT:16}

Problems

  1. We have deployed the service on Kubernetes with 6 pods and quartz threadPool count of 16. Unfortunately, we are seeing huge delay in task executing (around 2 hr).
  2. We also observed that quartz locking was taking time (3-4 sec's).
SELECT * 
FROM QRTZ_LOCKS 
WHERE SCHED_NAME = ? AND LOCK_NAME = ? FOR UPDATE

What are the things I can do to improve the quartz performance?

0

There are 0 best solutions below