Mautic Community Forums

Segments not Updating anymore

Mautic version is: 2.14.2 on Bitnami AWS EC2
PHP version is: 7.1.24

Hey hey,

My Mautic Instance that does not update segments anymore.

Segments are published
No error in the logs
Cron jobs segment:update was working until last Friday.

In AWS Monitoring I can see that my CPU usage dropped from 30% to 1.5% which I suspect is a good indicator of something not doing what it’s supposed to be doing…

I did however on Friday remove the segments update job only to put it back later in the evening. But I copied and pasted it back as it was so I’m not sure how the mistake could’ve happened.

Here is my cron job line for segment:update at the moment:

*/2 * * * * su daemon -s /bin/sh -c "/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/app/console mautic:segments:update" #mautic-segment$

Does anyone have any idea what could be wrong here? I suspect a code error in the way I pasted my cron job back but I can’t see anything wrong in this line…

I will restore my old Cron jobs list from a previous backup and will update here if I get any luck :slight_smile:

Okay so to keep everyone updated here, I retrieved the old list of cron jobs I used to have on a month old version of my instance and CPU Activity went back up to 50% from its faulty 1.5% (Used to be 30% in its normal state, pretty sure it’ll stabilize back eventually).

The only difference between the faulty cron job list and the old working one was that one line was dedicated to update specific segments using the -i IDNUMBER parameter.

So one line was segments:update and an other line was segments:update -i 5832 for instance. It used to work together but somehow stopped when I removed the segments:update and put it back in place afterwards it stopped working.

I forgot to clear the cache though before posting here so maybe clearing the cache would have fixed the issue without having to restore the previous cron jobs list.

I also don’t know for sure if it’s actually gonna update my segments now. I have so many segments it takes around 36 hours before it updates the newest ones but the Instance Activity Monitoring/CPU Usage indicates that activity resumed as it used to before the edits.

I will edit this thread to let you all know if restoring the cron jobs list did indeed fix the issue.