Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Job stuck in queue with timestamp NaN #1375

Closed
porcupine-plan opened this issue Aug 16, 2022 · 0 comments
Closed

Job stuck in queue with timestamp NaN #1375

porcupine-plan opened this issue Aug 16, 2022 · 0 comments

Comments

@porcupine-plan
Copy link

porcupine-plan commented Aug 16, 2022

I have few jobs in bull queue that is stuck for few days. I have made sure that QueueScheular is running but it is still not being marked as stalled

This is what I get if I console.log job. I noticed that it has timestamp NaN for some reason. I am not sure if that is of any significance or not. I also have removeOnComplete and removeOnFail set to true so that if it completes or failed it will be removed but that didn't seem to happen

{
  queue: <ref *1> Queue {
    _events: [Object: null prototype] {},
    _eventsCount: 0,
    _maxListeners: undefined,
    name: 'ETLQueue',
    opts: {
      prefix: 'bull',
      sharedConnection: true,
      blockingConnection: false,
      connection: [Redis]
    },
    connection: RedisConnection {
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      shared: true,
      blocking: false,
      _client: [Redis],
      opts: [Object],
      handleClientError: [Function (anonymous)],
      handleClientClose: [Function (anonymous)],
      initializing: [Promise],
      version: '6.0.5',
      [Symbol(kCapture)]: false
    },
    keys: {
      '': 'bull:ETLQueue:',
      active: 'bull:ETLQueue:active',
      wait: 'bull:ETLQueue:wait',
      waiting: 'bull:ETLQueue:waiting',
      paused: 'bull:ETLQueue:paused',
      resumed: 'bull:ETLQueue:resumed',
      id: 'bull:ETLQueue:id',
      delayed: 'bull:ETLQueue:delayed',
      priority: 'bull:ETLQueue:priority',
      'stalled-check': 'bull:ETLQueue:stalled-check',
      completed: 'bull:ETLQueue:completed',
      failed: 'bull:ETLQueue:failed',
      stalled: 'bull:ETLQueue:stalled',
      repeat: 'bull:ETLQueue:repeat',
      limiter: 'bull:ETLQueue:limiter',
      drained: 'bull:ETLQueue:drained',
      progress: 'bull:ETLQueue:progress',
      meta: 'bull:ETLQueue:meta',
      events: 'bull:ETLQueue:events',
      delay: 'bull:ETLQueue:delay'
    },
    toKey: [Function (anonymous)],
    scripts: Scripts { queue: [Circular *1] },
    token: '163fdaea-64fb-44b9-9930-1acc74065d6e',
    limiter: undefined,
    jobsOpts: undefined,
    [Symbol(kCapture)]: false
  },
  name: undefined,
  data: {},
  opts: { attempts: 0, delay: 0, backoff: undefined, removeOnComplete: true, removeOnFail: true },
  id: 'etlLog:5584',
  progress: 0,
  returnvalue: null,
  stacktrace: [
    'Error: Missing lock for job etlLog:5584. finished\n' +
      '    at Scripts.finishedErrors (/data/node_modules/bullmq/src/classes/scripts.ts:349:16)\n' +
      '    at Scripts.moveToFinished (/data/node_modules/bullmq/src/classes/scripts.ts:329:18)\n' +
      '    at runMicrotasks (<anonymous>)\n' +
      '    at processTicksAndRejections (internal/process/task_queues.js:95:5)\n' +
      '    at handleCompleted (/data/node_modules/bullmq/src/classes/worker.ts:572:25)\n' +
      '    at Worker.processJob (/data/node_modules/bullmq/src/classes/worker.ts:599:14)\n' +
      '    at Worker.retryIfFailed (/data/node_modules/bullmq/src/classes/worker.ts:728:16)'
  ],
  attemptsMade: 0,
  repeatJobKey: undefined,
  timestamp: NaN,
  parentKey: undefined,
  parent: undefined,
  toKey: [Function: bound ],
  scripts: Scripts {
    queue: <ref *1> Queue {
      _events: [Object: null prototype] {},
      _eventsCount: 0,
      _maxListeners: undefined,
      name: 'ETLQueue',
      opts: [Object],
      connection: [RedisConnection],
      keys: [Object],
      toKey: [Function (anonymous)],
      scripts: [Scripts],
      token: '163fdaea-64fb-44b9-9930-1acc74065d6e',
      limiter: undefined,
      jobsOpts: undefined,
      [Symbol(kCapture)]: false
    }
  },
  failedReason: 'Missing lock for job etlLog:5584. finished'
}

I am using nodejs v14.18 with bullmq version 1.86.2

If I call job.remove on it, it managed to remove that from queue which suggested that it was not currently being processed because otherwise it would have thrown error.

I am not sure why bull is not queuing these jobs.

@porcupine-plan porcupine-plan closed this as not planned Won't fix, can't repro, duplicate, stale Aug 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant