Skip to content

Nonworking dashboard for job with many retries #809

Closed
@morgoth

Description

We have a job:

class EveryMinuteJob < ApplicationJob
  after_perform do
    enqueue wait: 1.minute
  end

  def perform
    # do something
  end
end

That re-enqueues itself after performing. This is counted as "retry". The retry count can accumulate to a huge number in short time.
With some recent changes on GJ (which I didn't trace yet), such job with many retries kills the dashboard UI, as the retries are stored in database (some time ago they weren't).

Even the main dashboard page with jobs list, where job has only a counter of retries, it is endlessly loading, spiking in huge memory consumption.

We mitigated the problem by changing the job to:

class EveryMinuteJob < ApplicationJob
  after_perform do
    EveryMinuteJob.set(wait: 1.minute).perform_later
  end

  def perform
    # do something
  end
end

which is not counted as "retry" anymore.

@bensheldon Feel free to close it, as we workaround the problem, just giving you insights on some recent GJ changes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions