Stuck at deleting 70k tickets

Infos:

  • Used Zammad version: 6.0.0-1692632659.146fcc10.bionic
  • Used Zammad installation type: package
  • Operating system: Ubuntu 18.04.5 LTS
  • Browser + version: Google Chrome 115.0.5790.173

Expected behavior:

Correctly deleting users tickets after deletion of user.

Actual behavior:

DataPrivacyJob gets stuck indefinitely, monitoring says:

* scheduler may not run (last execution of DataPrivacyTaskJob.perform_now 31 minutes ago) - please contact your system administrator
* unprocessable mails: 1
* 14 failing background jobs
* Failed to run background job #1 'TicketArticleCommunicateEmailJob' 10 time(s) with 10 attempt(s).
* 149382 background jobs in queue

Steps to reproduce the behavior:

Create 70k of tickets from one user, then delete the user(along with his tickets).


Hello, we are using Zammad 3.6 and over the weekend we had some kind of email loop problem which resolved to 70000 tickets being created by user “Mail Delivery System”. When trying to create DataPrivacyJob on 3.6 we got error:
PG::StringDataRightTruncation: ERROR: value too long for type character varying(8000) : INSERT INTO "data_privacy_tasks".

This being known issue, I made VM snapshot and updated to 4.0 → 5.0 → 6.0.0. DataPrivacyTask gets created, but doesn’t do anything and after few hours it appears in the Monitoring section saying it is stuck. I destroyed the task and ran it again, current status looks like this:

How to fix these issues? Either on 3.6 on production or on 6.0 on test(I will update the production if it’s working).

Thank you.

As a workaround for this issue, you could create a schedule which deletes tickets of the user. It will run batched, processing up to a certain amount of tickets every time (I think it is limited to a couple of thousand tickets at once). Let that run for a couple of times and delete the bulk of the tickets, taking care to give the scheduler enough time to process all the background deletion tasks. Then, when the amount of tickets has sufficiently decreased, delete the user as you normally would.

I created a scheduler as you said, however it looks like it isn’t doing anything, I think it gets blocked by: “149415 background jobs in queue” which are not running, the number isn’t changing. Can I somehow delete these?

I created an issue for the deletion. There might be other non-related issues with your system as well, because your job count looks not very healthy.

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