Segment Rebuilt Error Message

Hi Everyone,

How do I clear my Mautic cache, i.e., ‘This segment has not been rebuilt in 78 hours’:

The CLI command ‘regerate the cache by warming it up’ did not work (i.e., sudo -u mautic php bin/console cache:warmup). See the screenshot error messages:

See the sf.mautic-emails-send file:

/home/mautic/public_html/mautic.devced.com/var/cache/run/sf.mautic-emails-send.f8887da39a17dfb1ee96a61884260c394951b7a56925ffc98f03399e9f5028fa.lock

  1. 2243116

The error source:

[22-Oct-2023 22:18:42 UTC] PHP Warning: Undefined array key “path” in /home/mautic/public_html/mautic.devced.com/app/bundles/CoreBundle/Controller/ExceptionController.php on line 111:

111: ‘route’ => $urlParts[‘path’],
112: ],
113: ‘responseCode’ => $code,

See, reference source, Full guide to permissions and cache in Mautic – Joey Keller

Regards,
Hal
DevCED Team

Hi @team,
usually that message disappears asap when the Segment has been updated .

The Cache clears itself by default every 10 minutes - you can set a timer in the System Settings:

Would you mind checking wether the Segment gets actually updated correctly by creating a dummy-contact that matches the Segment-Filters?

Best
Leon

Leon_Oltmanns,

The default timer in the System Settings is set at 10 Minutes:

Last 15 Cron Jobs:

[mautic@team ~]$ sudo grep mautic /var/log/cron | tail -15
Oct 23 10:50:01 team CROND[2264511]: (mautic) CMD (/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:emails:send >/dev/null 2>&1)
Oct 23 10:55:01 team CROND[2264797]: (mautic) CMD (/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:campaigns:rebuild --batch-limit=1200 >/dev/null 2>&1)
Oct 23 10:55:01 team CROND[2264798]: (mautic) CMD (/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:reports:scheduler >/dev/null 2>&1)
Oct 23 11:00:02 team CROND[2265014]: (mautic) CMD (/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:campaigns:trigger --batch-limit=1200 >/dev/null 2>&1)
Oct 23 11:00:02 team CROND[2265013]: (mautic) CMD (/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:broadcasts:send >/dev/null 2>&1)
Oct 23 11:05:01 team CROND[2265172]: (mautic) CMD (/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:import --limit=500 >/dev/null 2>&1)
Oct 23 11:05:01 team CROND[2265171]: (mautic) CMD (/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:emails:send >/dev/null 2>&1)
Oct 23 11:10:02 team CROND[2265401]: (mautic) CMD (/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:reports:scheduler >/dev/null 2>&1)
Oct 23 11:10:02 team CROND[2265402]: (mautic) CMD (/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:campaigns:rebuild --batch-limit=1200 >/dev/null 2>&1)
Oct 23 11:15:02 team CROND[2265607]: (mautic) CMD (/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:broadcasts:send >/dev/null 2>&1)
Oct 23 11:15:02 team CROND[2265609]: (mautic) CMD (/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:campaigns:trigger --batch-limit=1200 >/dev/null 2>&1)
Oct 23 11:20:02 team CROND[2265839]: (mautic) CMD (/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:import --limit=500 >/dev/null 2>&1)
Oct 23 11:20:02 team CROND[2265840]: (mautic) CMD (/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:emails:send >/dev/null 2>&1)
Oct 23 11:25:01 team CROND[2266164]: (mautic) CMD (/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:reports:scheduler >/dev/null 2>&1)
Oct 23 11:25:01 team CROND[2266166]: (mautic) CMD (/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:campaigns:rebuild --batch-limit=1200 >/dev/null 2>&1)
[mautic@team ~]$

Regards,
Hal
DevCED Team

Hi @team,
I dont see any segment-updates in your last 15 runs.
How often do you let them run?

Greets
Leon

Leon_Oltmanns,

Checkout the Mautic cron jobs:

Regards,
Hal
DevCED Team

Hi @team,
Yeah, there is no mautic:segments:update there. So your segments dont get updated.
If a segment has not been updates since X hours (This is configurable in the Config), that message appears.

You should add the missing cronjob.

Best
Leon

2 Likes

Hi Leon_Oltmanns,

The segment error message is gone.

Mautic cron job command: mautic:segment:update:

[mautic@team ~]$ /usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:segment:update --batch-limit=900
Rebuilding contacts for segment 2
0 total contact(s) to be added in batches of 900
0 total contact(s) to be removed in batches of 900
0 contact(s) affectedRebuilding contacts for segment 9
0 total contact(s) to be added in batches of 9000 total contact(s) to be removed in batches of 900
0 contact(s) affectedRebuilding contacts for segment 6
0 total contact(s) to be added in batches of 9000 total contact(s) to be removed in batches of 900
0 contact(s) affectedRebuilding contacts for segment 10
0 total contact(s) to be added in batches of 9000 total contact(s) to be removed in batches of 900
0 contact(s) affectedRebuilding contacts for segment 11
0 total contact(s) to be added in batches of 9000 total contact(s) to be removed in batches of 900
0 contact(s) affectedRebuilding contacts for segment 13
0 total contact(s) to be added in batches of 900
0 total contact(s) to be removed in batches of 900
0 contact(s) affected
Rebuilding contacts for segment 12
0 total contact(s) to be added in batches of 900
0 total contact(s) to be removed in batches of 900
0 contact(s) affected
Rebuilding contacts for segment 3
0 total contact(s) to be added in batches of 900
0 total contact(s) to be removed in batches of 900
0 contact(s) affected
[mautic@team ~]$

Last 60 cron job commands:

[mautic@team ~]$ sudo grep mautic /var/log/cron | tail -60Oct 23 15:59:24 team crontab[2279480]: (mautic) LIST (mautic)
Oct 23 15:59:24 team crontab[2279481]: (mautic) REPLACE (mautic)Oct 23 15:59:24 team crontab[2279483]: (mautic) LIST (mautic)
Oct 23 15:59:28 team crontab[2279485]: (mautic) LIST (mautic)Oct 23 15:59:28 team crontab[2279486]: (mautic) REPLACE (mautic)
Oct 23 15:59:29 team crontab[2279488]: (mautic) LIST (mautic)Oct 23 15:59:34 team crontab[2279492]: (mautic) LIST (mautic)
Oct 23 15:59:34 team crontab[2279493]: (mautic) REPLACE (mautic)Oct 23 15:59:34 team crontab[2279495]: (mautic) LIST (mautic)
Oct 23 15:59:41 team crontab[2279505]: (mautic) LIST (mautic)Oct 23 15:59:41 team crontab[2279506]: (mautic) REPLACE (mautic)
Oct 23 15:59:42 team crontab[2279508]: (mautic) LIST (mautic)Oct 23 16:00:01 team crond[2036]: (mautic) RELOAD (/var/spool/cron/mautic)
Oct 23 16:00:27 team crontab[2279561]: (mautic) LIST (mautic)Oct 23 16:00:27 team crontab[2279562]: (mautic) REPLACE (mautic)
Oct 23 16:00:27 team crontab[2279564]: (mautic) LIST (mautic)Oct 23 16:01:01 team crond[2036]: (mautic) RELOAD (/var/spool/cron/mautic)
Oct 23 16:01:04 team crontab[2279607]: (mautic) LIST (mautic)Oct 23 16:01:04 team crontab[2279608]: (mautic) REPLACE (mautic)
Oct 23 16:01:04 team crontab[2279610]: (mautic) LIST (mautic)Oct 23 16:02:01 team crond[2036]: (mautic) RELOAD (/var/spool/cron/mautic)
Oct 23 16:02:22 team crontab[2279644]: (mautic) LIST (mautic)
Oct 23 16:02:22 team crontab[2279645]: (mautic) REPLACE (mautic)
Oct 23 16:02:22 team crontab[2279647]: (mautic) LIST (mautic)
Oct 23 16:03:01 team crond[2036]: (mautic) RELOAD (/var/spool/cron/mautic)
Oct 23 16:03:40 team crontab[2279687]: (mautic) LIST (mautic)
Oct 23 16:03:40 team crontab[2279688]: (mautic) REPLACE (mautic)
Oct 23 16:03:41 team crontab[2279691]: (mautic) LIST (mautic)
Oct 23 16:04:01 team crond[2036]: (mautic) RELOAD (/var/spool/cron/mautic)
Oct 23 16:04:21 team crontab[2279729]: (mautic) LIST (mautic)
Oct 23 16:04:21 team crontab[2279730]: (mautic) REPLACE (mautic)
Oct 23 16:04:21 team crontab[2279732]: (mautic) LIST (mautic)
Oct 23 16:05:01 team crond[2036]: (mautic) RELOAD (/var/spool/cron/mautic)
Oct 23 16:05:01 team CROND[2279775]: (mautic) CMD (/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:emails:send–message-limit=1000 >/dev/null 2>&1)
Oct 23 16:05:05 team crontab[2279890]: (mautic) LIST (mautic)
Oct 23 16:05:05 team crontab[2279891]: (mautic) REPLACE (mautic)
Oct 23 16:05:05 team crontab[2279895]: (mautic) LIST (mautic)
Oct 23 16:05:41 team crontab[2279919]: (mautic) LIST (mautic)
Oct 23 16:05:41 team crontab[2279920]: (mautic) REPLACE (mautic)
Oct 23 16:05:41 team crontab[2279922]: (mautic) LIST (mautic)
Oct 23 16:06:01 team crond[2036]: (mautic) RELOAD (/var/spool/cron/mautic)
Oct 23 16:10:01 team CROND[2280095]: (mautic) CMD (/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:reports:scheduler >/dev/null 2>&1)
Oct 23 16:10:01 team CROND[2280096]: (mautic) CMD (/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:campaigns:rebuild --batch-limit=1000 >/dev/null 2>&1)
Oct 23 16:15:02 team CROND[2280362]: (mautic) CMD (/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:segment:update --batch-limit=900 >/dev/null 2>&1)
Oct 23 16:15:02 team CROND[2280363]: (mautic) CMD (/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:broadcasts:send --batch-limit=1000 >/dev/null 2>&1)
Oct 23 16:15:02 team CROND[2280364]: (mautic) CMD (/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:campaigns:trigger --batch-limit=1000 >/dev/null 2>&1)
Oct 23 16:20:01 team CROND[2280821]: (mautic) CMD (/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:emails:send–message-limit=1000 >/dev/null 2>&1)
Oct 23 16:20:01 team CROND[2280823]: (mautic) CMD (/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:import --limit=500 >/dev/null 2>&1)
Oct 23 16:25:01 team CROND[2281073]: (mautic) CMD (/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:campaigns:rebuild --batch-limit=1000 >/dev/null 2>&1)
Oct 23 16:25:01 team CROND[2281080]: (mautic) CMD (/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:reports:scheduler >/dev/null 2>&1)
Oct 23 16:30:01 team CROND[2281369]: (mautic) CMD (/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:broadcasts:send --batch-limit=1000 >/dev/null 2>&1)
Oct 23 16:30:01 team CROND[2281370]: (mautic) CMD (/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:segment:update --batch-limit=900 >/dev/null 2>&1)
Oct 23 16:30:01 team CROND[2281372]: (mautic) CMD (/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:campaigns:trigger --batch-limit=1000 >/dev/null 2>&1)
Oct 23 16:35:02 team CROND[2281717]: (mautic) CMD (/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:emails:send–message-limit=1000 >/dev/null 2>&1)
Oct 23 16:35:02 team CROND[2281719]: (mautic) CMD (/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:import --limit=500 >/dev/null 2>&1)
Oct 23 16:40:02 team CROND[2282069]: (mautic) CMD (/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:reports:scheduler >/dev/null 2>&1)
Oct 23 16:40:02 team CROND[2282068]: (mautic) CMD (/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:campaigns:rebuild --batch-limit=1000 >/dev/null 2>&1)
Oct 23 16:45:02 team CROND[2282340]: (mautic) CMD (/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:segment:update --batch-limit=900 >/dev/null 2>&1)
Oct 23 16:45:02 team CROND[2282337]: (mautic) CMD (/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:campaigns:trigger --batch-limit=1000 >/dev/null 2>&1)
Oct 23 16:45:02 team CROND[2282338]: (mautic) CMD (/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:broadcasts:send --batch-limit=1000 >/dev/null 2>&1)
[mautic@team ~]$

Do you see any further issues with the revised cron jobs:

Thanks,
Hal
DevCED Team