[solved] CPU at 100% in Zammad 2.9 and later

Follow-up to Email notification delay about 5 hours, CPU Usage 100% , which that thread closed last year. Environment: Debian 9 + Zammad re-install from March 2019


  • CPU hits 100% regularly.
  • Emails fail to deliver.
  • tail /var/log/zammad/production.log indicates failed lock attempts; my system was apparently hung up on some data from 2 months ago.

Solution (as a sudo-based user)

systemctl stop zammad
su - zammad
zammad run rails r “Delayed::Job.delete_all”
curl -XDELETE ‘localhost:9200/zammad_production’
zammad run rake searchindex:rebuild
systemctl restart zammad

1 Like

The actual log file messages would be useful to tell you what’s wrong.
Beside, a zammad run rails r 'Delayed::Job.delete_all' is a dangerous act, especially if you’re having issues with delayed messages being sent. This will also delete messages jobs (notifications and outgoing mails to customers) beside e.g. Indexing jobs.

1 Like

I, [2019-03-25T08:39:32.219168 #26776-46926529974100] INFO – : Scheduler started.
I, [2019-03-25T08:39:32.227527 #26776-46926529974100] INFO – : Cleanup of left over locked delayed jobs 2019-03-25 08:39:32 UTC started.
I, [2019-03-25T08:39:32.275594 #26776-46926529974100] INFO – : Checking left over delayed job #<Delayed::Backend::ActiveRecord::Job id: 13895, priority: 0, attempts: 0, handler: “— !ruby/object:Observer::UserDeviceLogJob\nhttp_u…”,
last_error: nil, run_at: “2019-02-03 16:34:40”, locked_at: “2019-02-03 16:34:41”, failed_at: nil, locked_by: “host:HOSTNAME pid:30512”, queue: nil, created_at: “2019-02-03 16:34:40”, updated_at: “2019-02-03 16:34:40”> started.
I, [2019-03-25T08:39:32.360909 #26776-46926529974100] INFO – : Scheduler stopped.

That’s what you’re looking for; that was resolved with the full delete command. The original command in the old post didn’t work.

1 Like

Okay, thanks for the feedback. Proberbly it would have been enough to just remove job ID 13895, but glad it’s working for you. :slight_smile:

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