After Cache-delete "The site is currently offline due to encountering an error"

Your software
My Mautic version is: 3.2.4 (but I think I always had this issue, even with 2.x)
My PHP version is: 7.3.27

Your problem
When I try to delete the " var/cache " or " var/cache/prod " folder via FTP , Mautic always breaks and shows just an " The site is currently offline due to encountering an error " error. Even after an hour and multiple page-refreshs, it doesn’t work.

On Github I got advised doing this file-permission-reset, which I did. It didn’t fix my problem.

These errors are showing in the log:
Nothing.

Sounds like a permissions issue indeed.
can you show us the rights for var and var/cache (via the dir command in FTP, or ls -l in ssh)

Then how did you solve it in previous cases?

Best,
Ekke


Ekke Guembel

Mautic Open Source Project, Team Lead “Community”
Mail: ekke.guembel@mautic.org
Phone: +49 511 6262 9311
Profile & Social Media: Ekkehard Gümbel
Mautic Podcast: mauticast.de (DE) / mauticast.com (EN)

Both are 755, and so is “prod” too.

Usually I just put back a backup of the cache-folder (DropMySite makes daily backups of my Mautic-files). A few days ago, when I posted this issue, I did the same.

755 - but owner being the same user under which the webserver is running ?

Sorry, but I don’t know too much about these server-things. I have 1 username, and I use always that for accessing FTP, SSH, WHM and cPanel. I might have a “root” user too, but I never use that.

I now googled a bit to see how that “ls -l” works, and here is what I got using them:

drwxr-xr-x  6 myusername myusername  4096 Apr 24 07:07 var/
drwxr-xr-x 5 myusername myusername 4096 Apr 24 06:12 cache/

Sorry, but I don’t know too much about these server-things. I have 1 username, and I use always that for accessing FTP, SSH, WHM and cPanel. I might have a “root” user too, but I never use that.

No worries. If the var folder (and probably the other Mautic folders too) are all owned by your user, the webserver will be running on that account too.

Anyway, 2 1/2 more checks please:

  • Just to confirm: var/cache ist still empty? Please do an
    ls -l
    within that folder.

  • Please do another clear cache:
    php bin/console mautic:cache:clear
    What does it report?

  • Immediately thereafter, try
    tail var/logs/mautic_prod-2021-04-27.php (or what ever is)
    What messages are displayed?

No, because as said I uploaded there a backup of it, otherwise I wouldn’t be able to access/use Mautic. So at the moment this is the content of var/cache:

total 16
drwxr-xr-x 2 imicp imicp 4096 Apr 24 06:12 ip_data/
-rw-r--r-- 1 imicp imicp 3247 Apr 26 05:15 languageList.txt
drwxr-xr-x 8 imicp imicp 4096 Apr 26 13:49 prod/
drwxr-xr-x 2 imicp imicp 4096 Apr 27 09:00 run/

This command doesn’t seem to do anything at all. It doesn’t say anything in Terminal after doing it, and neither do the files in FTP disappear.

Just totally unrelated errors I had earlier today (I tried to send for the 1st time segment-emails, and didn’t work somehow).

SOLVED! I read at “ERR_BUILD_M3_CACHE: Failed to build cache for Mautic 3” that somebody had upgrade-problems and I found similar errors in my log today. Than the user @imrodmartin revealed that’s because of an outdated plugin. I deleted than the Plugin “MauticExtendeeToolsBundle” (which generated the errors) and now deleting the cache-folder is not a problem anymore.

For future searchers: The error was:

[27-Apr-2021 14:54:22 UTC] ReflectionException: Class "Mautic\CoreBundle\EventListener\CommonSubscriber" not found while loading "MauticPlugin\MauticExtendeeToolsBundle\EventListener\ButtonSubscriber". - in file /mywebsite/mautic/vendor/symfony/config/Resource/ClassExistenceResource.php - at line 181

@ekke Thank you very much for trying to help me! :slight_smile:

oh wow - thanks a lot for sharing!
:slight_smile: