[solved] 1772421 background jobs in queue

  • Used Zammad version: 2.8.x
  • Used Zammad installation source: apt package
  • Operating system: Debian 8.11
  • Browser + firefox:

After problems with our mail server and the connection to elasticsearch, there are 1.8 million jobs on hold. The number drops very slowly(80 per Minute) the problem is that he no longer sends messages because he is busy with the queue. Is there any way to empty the queue without compromising the consistency of the database?

Expected behavior:

cleanup background jobs faster

Actual behavior:

background job quantity 80 jobs per minute

Steps to reproduce the behavior:

lost Connection to Elastic Search and Mail Server(fixed)

Hat niemand eine Idee?

The Problem at your end is, that you currently can’t ensure that there’s not some background jobs like sending notifications, E-Mails or other trigger based stuff.

So destroying / deleting all background jobs would give you quite a hard time, as those E-Mail-Jobs would get lost as well.

You can use the following untested command on zammads rails console. Please to a snapshot of your machine, if possible. This should delete only the backgroundjobs for updating search indexes.

Delayed::Job.where("handler LIKE '%BackgroundJobSearchIndex%'").destroy_all

After doing that, you also need to recreate your searchindex, as it should have drifted away from your productive data quite a lot.

zammad run rake searchindex:rebuild

1 Like

Thanks, it works now

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.