Allowed memory size exhausted

Post

Posted
Rating:
#3329 (In Topic #619)
Avatar
Standard member
ckgowens is in the usergroup ‘Fan in training’

I'm getting frequent "Critical Errors" on my site with the error being the "Allowed memory size of XXXXXXX bytes exhausted (tried to allocate XXXXXX bytes) in sources/caches3.php on line 331."

I've increased the php_memory limit and added additional swap memory for the site but these don't seem to resolve the issue. I end up having to flush the cache to alleviate the error, but I don't want to have to mannual do that every time the error pops up. Is there some setting I'm missing that is causing this issue?
Online now: No Back to the top

Post

Posted
Rating:
#3330
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Can you please give us an example of what XXXXXX is?


Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#3331
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Also, a list of places the error occurs.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#3332
Avatar
Standard member
ckgowens is in the usergroup ‘Fan in training’
Here is the most recent example in the error log:

25-Oct-2017 08:37:31 UTC   PHP Error   Allowed memory size of 67108864 bytes exhausted (tried to allocate 343467 bytes) in sources/caches3.php on line 331

The latest place that it has been encountered by users when they try to access the form to join the site. The "Critical Error" page appears rather than the join form.
Online now: No Back to the top

Post

Posted
Rating:
#3333
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Okay, thanks.

I may need to look directly on the server to run tests. If you are able to provide that access (E.g. FTP details), please e-mail to chris@ocproducts.com.

Regardless, I will see if I can see any memory bottlenecks on this page.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#3334
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Hi,

I suspect you may have placed some large files in one of the template directories.

Check you haven't accidentally uploaded alien files to any of these directories:
themes/*/css
themes/*/css_custom
themes/*/javascript
themes/*/javascript_custom
themes/*/templates
themes/*/templates_custom
themes/*/text
themes/*/text_custom
themes/*/xml
themes/*/xml_custom

The error message suggests a file at least 300kb in size, which is unlikely for a template file, but I suspect you have a lot of alien files in there.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#3335
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Default directory sizes in bytes for these directories…

Code

8   xml_custom
40   text_custom
144   xml
176   text
216   css_custom
888   javascript_custom
1184   css
1352   templates_custom
4584   javascript
8056   templates


Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#3336
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
And this fix for sources/caches3.php will stop it reading irrelevant file types within template directories:
https://raw.githubusercontent.com/ocproducts/composr/f79e2e8b9893e6ffbdca2b4e7a35451ce5521fa0/sources/caches3.php

That will probably fix the issue for you also.

More detail:
When certain automatic cache flushes happen it limits cache flushing of templates based on ones matching certain patterns only within their data. To do this it has to read all the templates. If there's alien files in there it is reading in all that data unnecessarily. The hotfix will target what files it will read.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#3337
Avatar
Standard member
ckgowens is in the usergroup ‘Fan in training’
I don't see any alien files, just .tpl files but the templates_custom folder has multiple versions (differentiated with an appended number) of some of the more commonly edited templates. I've switched out the caches3.php file with the one provided and I'll monitor to see if the issue persists. Thanks so much for the help!
Online now: No Back to the top

Post

Posted
Rating:
#3338
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Ah, those multiple versions could be it, something I'd not considered to be there in large quantity. I'm confident my fix will resolve that.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top
1 guest and 0 members have just viewed this.
Back to Top