Problems deleting emails using GenericAgent from large queue

Moderator: crythias

Post Reply
MomentoJams
Znuny newbie
Posts: 10
Joined: 17 Mar 2021, 01:36
Znuny Version: 6.0.30
Real Name: James Whitwell

Problems deleting emails using GenericAgent from large queue

Post by MomentoJams »

Hi,

I'm having trouble deleting emails from a large queue (~125 000 emails) using GenericAgent. It deleted about 30 000 emails without a problem, but now it keeps displaying the same number of affected tickets every time I run the agent e.g. I see this same message every time:

Code: Select all

Warning: There are 122350 tickets affected but only 4000 may be modified during one job execution! 
How can I debug the issue further?

Thanks.
skullz
Znuny superhero
Posts: 624
Joined: 24 Feb 2012, 03:58
Znuny Version: LTS and Features
Real Name: Mo Azfar
Location: Kuala Lumpur, MY
Contact:

Re: Problems deleting emails using GenericAgent from large queue

Post by skullz »

by default, only 4000 ticket will be effected per generic agent execution.

you may check System Configuration > Ticket::GenericAgentRunLimit
root
Administrator
Posts: 3968
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Problems deleting emails using GenericAgent from large queue

Post by root »

Hi,

Add a schedule and be patient.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
MomentoJams
Znuny newbie
Posts: 10
Joined: 17 Mar 2021, 01:36
Znuny Version: 6.0.30
Real Name: James Whitwell

Re: Problems deleting emails using GenericAgent from large queue

Post by MomentoJams »

Thanks for your replies. Actually, the problem is that it's just not deleting anything, no matter how many times I run it. It was deleting the default amount before (4000) -- which I haven't changed yet -- but now it doesn't remove anything from the queue at all.

Is there something I can do to figure out what's going on?

Thanks.
root
Administrator
Posts: 3968
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Problems deleting emails using GenericAgent from large queue

Post by root »

Hi,

Does the GenericAgent show how many tickets should be deleted when you click on execute? This check's the conditions for the search. If not you probably should post a screenshot.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
MomentoJams
Znuny newbie
Posts: 10
Joined: 17 Mar 2021, 01:36
Znuny Version: 6.0.30
Real Name: James Whitwell

Re: Problems deleting emails using GenericAgent from large queue

Post by MomentoJams »

root wrote: 15 Aug 2023, 07:29 Does the GenericAgent show how many tickets should be deleted when you click on execute? This check's the conditions for the search.
Hi, yes it does: 122350. This number stays the same for each run. It's a bit baffling as it had been running before this (about 10 runs, reducing the ticket count from ~160000 to this number), but repeated running after that now does a lot of work but no reduction in the number of tickets in the queue.

I've been running mytop and it's showing lots of activity (high qps and lots of "DELETE ..." types of queries, too fast to capture).
root
Administrator
Posts: 3968
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Problems deleting emails using GenericAgent from large queue

Post by root »

Hi,

When you run the command
bin/otrs.Console.pl Maint::Daemon::Summary
is there sth int the output like this:

Code: Select all

  Recurrent generic agent tasks:
  +-------------------------------------------------------------+---------------------+-------------+---------------+---------------------+
  | Name                                                        | Last Execution      | Last Status | Last Duration | Next Execution      |
  +-------------------------------------------------------------+---------------------+-------------+---------------+---------------------+
  | 1010 Daily delete tickets in Junk after 4 weeks not changed | 2023-08-16 06:05:00 | Success     | 1.0 Second(s) | 2023-08-17 06:05:00 |
  +-------------------------------------------------------------+---------------------+-------------+---------------+---------------------+
There must be your GenericAgent listed that deletes the tickets.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
Post Reply