# Endless Cronjobs for Updating Campaign Action

**URL:** <https://forum.mautic.org/t/endless-cronjobs-for-updating-campaign-action/23881>\
**Category:** Product Support\
**Tags:** mautic-4\
**Created:** [April 25, 2022, 5:43pm UTC](https://forum.mautic.org/t/endless-cronjobs-for-updating-campaign-action/23881 "2022-04-25T17:43:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dirk\_s](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dirk_s/32/748_2.png) [@dirk\_s](https://forum.mautic.org/u/dirk_s)\
**Post date:** [April 25, 2022, 5:43pm UTC](https://forum.mautic.org/t/endless-cronjobs-for-updating-campaign-action/23881/1 "2022-04-25T17:43:19Z")

</div>

**Your software**  
My Mautic version is: 4.2.0 / 4.2.1  
My PHP version is: 7.4  
My Database type and version is: 10.3.34-MariaDB-0+deb10u1-log

**Your problem**  
My problem is:

- out of nothing suddenly my cronjob logs (for one occasion) exploded to 80GB and growing
- reason was a never ending campaign build activity (see screenshot)
- there was planned to be one contact added in increments of 300
- still after 800k steps not finished

These errors are showing in the log:

- none

Steps I have tried to fix the problem:

- regenerated assets (m:a:g)
- cleared cache
- upgraded from 4.2.0. to 4.2.1
- check schema (fine)

How can I find out, which contact is about to be added? Maybe this one has gone crazy?

 ![Bildschirmfoto 2022-04-25 um 18.00.56](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/b/b0b0b1a5a295df5602edb24344f4849b183e4bb1.png)

---

<div class="post-metadata">

**Author:** ![pierre\_a](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/pierre_a/32/7031_2.png) [@pierre\_a](https://forum.mautic.org/u/pierre_a)\
**Post date:** [April 26, 2022, 10:23am UTC](https://forum.mautic.org/t/endless-cronjobs-for-updating-campaign-action/23881/2 "2022-04-26T10:23:51Z")

</div>

Hello @dirk_s,

How many contacts do you have in Mautic?  
How many segments do you have?  
How many campaigns do you have?

Can you disable the current problematic campaign, is CRONjob still a problem?

Pierre

---

<div class="post-metadata">

**Author:** ![dirk\_s](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dirk_s/32/748_2.png) [@dirk\_s](https://forum.mautic.org/u/dirk_s)\
**Post date:** [April 26, 2022, 1:57pm UTC](https://forum.mautic.org/t/endless-cronjobs-for-updating-campaign-action/23881/3 "2022-04-26T13:57:50Z")

</div>

Hi @pierre_a its only around 9k in this installation. 2 dozens of segments active, about 3-4 dozens of active campaigns. Of course - disabling the related campaign stops the issue. Cloning it and running the new one is also no problem.

I only get concerned, that the instance is somehow messed up and would like to find the root cause.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [April 26, 2022, 3:34pm UTC](https://forum.mautic.org/t/endless-cronjobs-for-updating-campaign-action/23881/4 "2022-04-26T15:34:24Z")

</div>

Hello @dirk_s ,  
Couple of questions:

1. how often you trigger your cronjobs?
2. Do you have campaigns with jump to other actions inside? Is it possible that some of your actions got into a loop?

Thx,  
joey

---

<div class="post-metadata">

**Author:** ![dirk\_s](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dirk_s/32/748_2.png) [@dirk\_s](https://forum.mautic.org/u/dirk_s)\
**Post date:** [April 26, 2022, 4:30pm UTC](https://forum.mautic.org/t/endless-cronjobs-for-updating-campaign-action/23881/5 "2022-04-26T16:30:08Z")

</div>

Hi @joeyk it runs every 2 min. The concerned campaigns have only one action for one or more segments. No jumps, no loops…

I now cloned all three concerned compaigns and deactivated them. The clones seem to work alright. So I guess it may be a random problem, which I can’t really debug. Starting the old campaigns will immediately cause the problem again.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [April 26, 2022, 4:32pm UTC](https://forum.mautic.org/t/endless-cronjobs-for-updating-campaign-action/23881/6 "2022-04-26T16:32:34Z")

</div>

Hey,  
Good that you could narrow it down.  
I usually check like this:

1. turn off cron.
2. make sure it finished it’s job
3. run the cron manually and check when it finishes. You can also see in ssh which campaign is the culprit and why:

- does it have too many inactive items?
- just simply too large and slow?
