Local vs Master Value

Hello, can someone share with me which value is actually used by Mautic?

I have memory_limit value read as 2048M in Local and 128M on Master. There is no recommendation on increasing memory limit on the System Info tab. I assume having this local value as 2048M is good to go.

But then, when i let the cron job fire the cache clearing job, it hits this error.

PHP Error: Allowed memory size of <number> bytes exhausted (tried to allocate <number> bytes) - in file <filepath> - at line <number>

Hi,

I would sugest to clear the cache with rm -rf var/cache/dev/* var/cache/prod/* as using the command cache:clear can sometimes lead to unnecessary troubles.

I do not think you will have the above error if yoyu choose approach suggested above.

Hey thanks @mzagmajster . I am hosting it on nginx server. My home path is /home/sites/18b/5/5d5bde27d1/.

Would you help me what are the correct way to schedule a cron job for that?
I have tried the following but they are not working:

  1. /home/sites/18b/5/5d5bde27d1/public_html/saidhasyim.com/email/bin.console rm -rf /home/sites/18b/5/5d5bde27d1/public_html/saidhasyim.com/email/var/cache/*

  2. rm -rf /home/sites/18b/5/5d5bde27d1/public_html/saidhasyim.com/email/var/cache/*

  3. rm -rf public_html/saidhasyim.com/email/var/cache/*

This was a working command that i used previously, but it hit error with the memory size limit

/usr/bin/php80 /home/sites/18b/5/5d5bde27d1/public_html/saidhasyim.com/email/bin/console cache:clear

So i guess your mautic root directory is:

/home/sites/18b/5/5d5bde27d1/public_html/saidhasyim.com/email

by default cache would here(please check):

/home/sites/18b/5/5d5bde27d1/public_html/saidhasyim.com/email/var/cache

That would mean that the end command would look something like this:

/usr/bin/rm -rf /home/sites/18b/5/5d5bde27d1/public_html/saidhasyim.com/email/var/cache/prod/*

1 Like

Hey @mzagmajster , thanks very much for this. The folder is correct.
somehow, i can’t fire this command. Perhaps my web server does not support rm command.

I verified the list of available bin command that i can use are below. Do you have any suggestion?

  • PHP 5.3 /usr/bin/php53
  • PHP 5.4 /usr/bin/php54
  • PHP 5.5 /usr/bin/php55
  • PHP 5.6 /usr/bin/php56
  • PHP 7.0 /usr/bin/php70
  • PHP 7.1 /usr/bin/php71
  • PHP 7.2 /usr/bin/php72
  • PHP 7.3 /usr/bin/php73
  • PHP 7.4 /usr/bin/php74
  • PHP 8.0 /usr/bin/php80
  • PHP 8.1 /usr/bin/php81
  • Ruby /usr/bin/ruby
  • Python /usr/bin/python
  • Perl /usr/bin/perl

it can be located under: /bin/rm.
Run whereis rm to find out the path.

Hmm… It does not let me issue this command. May be an access restriction. I will check with the server admin :slight_smile:

I have one more issue with local vs master value. My zend.assertions remains “1” in both Master and Local. i have set zend.assertions = -1 inside custom user.ini and custom php.ini inside /saidhasyim.com/email/ folder.

But, sometimes my Loaded Configuration File points to /usr/php80/etc/php.ini (this php.ini is the server config that is beyond my control) and sometimes it points to my local custom config /home/sites/18b/5/5d5bde27d1/public_html/saidhasyim.com/email/php.ini

Do you know whether this is the correct behavior? or is there a way to force it to load my custom config?

Thanks again for your help @mzagmajster

Not sure about the custom php ini file and why is not picked up by the server.

Thanks for your help @mzagmajster

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.