Sidekiq Intro Please


#1

Is there anyone that can describe what is on this screenshot?

I haven’t a clue what any of it means and if I should do something to fix it.


#2

Sidekiq is a background processing unit. Background processing is processing that happens outside of the request-response cycle (e.g. users visiting a page on Mastodon) and therefore does not slow down responses.

This is a dashboard of Sidekiq. The top graph is a real-time illustration of failed/processed jobs (you will see it move from right to left as time passes). The bottom graph is a historical illustration of failed/processed jobs. On your screenshot you can see that your instance processed 8,675 jobs on April 1st. There is nothing you have to do with this information, it’s just there. It’s OK for some jobs to fail all the time, but if you notice that all of them are failing, that may be a sign of a problem. Down below, there are some snippets of information: how much RAM redis is consuming right now, how much was the highest RAM it ever consumed (peak), and other self-explanatory stuff.

Above you see navigation. Total processed jobs, total failed jobs are not links, just numbers.

0 Busy: This shows how many threads are processing jobs RIGHT NOW. If there are no jobs to be processed, then it’s 0 obviously. When you click on it, you’ll see a page that lists running Sidekiq processes etc. The maximum number of “busy” is the -c (for concurrency) parameter that you put in the systemd unit file (or docker-compose.yml) for Sidekiq.

0 Enqueued is jobs waiting to be processed. If you click on it you’ll see which queues those are in.

9 Retries is jobs that have failed but are scheduled to be retried. It’s OK for jobs to fail. Mastodon is a networked application and it does a lot of things that can reasonably fail temporarily. Sidekiq automatically reschedules failures in a reasonable manner. If you click you’ll see which jobs failed and what their error message was.

0 Scheduled is jobs that were queued for the future. We don’t really use that. But if you click on that, you will see jobs that run periodically, and you have a button to execute them sooner.

6 Dead is jobs that have failed and have been retried and still failed so they won’t be retried anymore. That page only stores 10k of such jobs at max. You can think of it as a graveyard really. Nothing happens to those jobs anymore, but you can look at what the error messages were. If you’re troubleshooting it can contain interesting information. Otherwise, it’s useless. You can go there and click “delete all” if you want. It doesn’t matter.


#3

Perfect; thanks @Gargron!