michaelklishin / quartz-mongodb

A MongoDB-based store for the Quartz scheduler. This fork strives to be as feature complete as possible. Originally by MuleSoft.
Other
248 stars 203 forks source link

I am keep getting lock error and multiple instance are running for a job #131

Closed knoxxs closed 6 years ago

knoxxs commented 7 years ago

Error retrieving expired lock from the database. Maybe it was deleted

Why this is happening?

I am new to quartz, pls help.

Also multiple instances are running for my job. Though the misfire instruction is 2 :

quartz_qa> db.quartz_triggers.findOne({"keyName": "MessageExecutorJob___coalarts"})
{
    "_id": ObjectId("57ffc9c18f440d6d223b569b"),
    "state": "waiting",
    "calendarName": null,
    "class": "org.quartz.impl.triggers.CronTriggerImpl",
    "description": null,
    "endTime": null,
    "finalFireTime": null,
    "fireInstanceId": null,
    "jobId": ObjectId("57ffc9c18f440d6d223b5699"),
    "keyName": "MessageExecutorJob___coalarts",
    "keyGroup": "Message Executor",
    "misfireInstruction": 2,
    "nextFireTime": ISODate("2016-10-13T18:25:00Z"),
    "previousFireTime": ISODate("2016-10-13T18:24:30Z"),
    "priority": 5,
    "startTime": ISODate("2016-10-13T17:52:01Z"),
    "cronExpression": "0/30 * * * * ?",
    "timezone": "UTC"
}

The second instance started on misfire, I confirmed by adding a log in Misfire listener. This doesn't used to happen before while I was using RAMJobStore.

michaelklishin commented 6 years ago

Not enough information to suggest anything specific, the issue is well over 1 year old => closing.