# Local vs Master Value

**URL:** <https://forum.mautic.org/t/local-vs-master-value/25903>\
**Category:** Mautic 4 Install/Upgrade Support\
**Tags:** community\
**Created:** [October 31, 2022, 9:17pm UTC](https://forum.mautic.org/t/local-vs-master-value/25903 "2022-10-31T21:17:43Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![saidhasyim](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/saidhasyim/32/6368_2.png) [@saidhasyim](https://forum.mautic.org/u/saidhasyim)\
**Post date:** [October 31, 2022, 9:17pm UTC](https://forum.mautic.org/t/local-vs-master-value/25903/1 "2022-10-31T21:17:43Z")

</div>

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.

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

```

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [October 31, 2022, 11:42pm UTC](https://forum.mautic.org/t/local-vs-master-value/25903/2 "2022-10-31T23:42:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![saidhasyim](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/saidhasyim/32/6368_2.png) [@saidhasyim](https://forum.mautic.org/u/saidhasyim)\
**Post date:** [November 1, 2022, 12:03am UTC](https://forum.mautic.org/t/local-vs-master-value/25903/3 "2022-11-01T00:03:52Z")

</div>

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/\*

---

<div class="post-metadata">

**Author:** ![saidhasyim](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/saidhasyim/32/6368_2.png) [@saidhasyim](https://forum.mautic.org/u/saidhasyim)\
**Post date:** [November 1, 2022, 12:08am UTC](https://forum.mautic.org/t/local-vs-master-value/25903/4 "2022-11-01T00:08:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [November 1, 2022, 12:36am UTC](https://forum.mautic.org/t/local-vs-master-value/25903/5 "2022-11-01T00:36:43Z")

</div>

So i guess your mautic root directory is:

```auto
/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/*`

---

<div class="post-metadata">

**Author:** ![saidhasyim](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/saidhasyim/32/6368_2.png) [@saidhasyim](https://forum.mautic.org/u/saidhasyim)\
**Post date:** [November 1, 2022, 12:55am UTC](https://forum.mautic.org/t/local-vs-master-value/25903/6 "2022-11-01T00:55:41Z")

</div>

> [@mzagmajster](#):
>
> /usr/bin/rm -rf /home/sites/18b/5/5d5bde27d1/public\_html/saidhasyim.com/email/var/cache/prod/\*

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**

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [November 1, 2022, 1:40am UTC](https://forum.mautic.org/t/local-vs-master-value/25903/7 "2022-11-01T01:40:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![saidhasyim](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/saidhasyim/32/6368_2.png) [@saidhasyim](https://forum.mautic.org/u/saidhasyim)\
**Post date:** [November 1, 2022, 1:50am UTC](https://forum.mautic.org/t/local-vs-master-value/25903/8 "2022-11-01T01:50:41Z")

</div>

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

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

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [November 1, 2022, 2:00am UTC](https://forum.mautic.org/t/local-vs-master-value/25903/9 "2022-11-01T02:00:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![saidhasyim](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/saidhasyim/32/6368_2.png) [@saidhasyim](https://forum.mautic.org/u/saidhasyim)\
**Post date:** [November 1, 2022, 2:08am UTC](https://forum.mautic.org/t/local-vs-master-value/25903/10 "2022-11-01T02:08:24Z")

</div>

Thanks for your help @mzagmajster

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/1X/43c63600fe51440378769136903f1fa2a9a34102.png) [@system](https://forum.mautic.org/u/system)\
**Post date:** [November 2, 2022, 2:08pm UTC](https://forum.mautic.org/t/local-vs-master-value/25903/11 "2022-11-02T14:08:57Z")

</div>

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