backdrop-ops / forum.backdropcms.org

The Forum for BackdropCMS.org.
https://forum.backdropcms.org/
4 stars 10 forks source link

Increase PHP memory_limit? #67

Closed jenlampton closed 6 years ago

jenlampton commented 6 years ago

We got a complaint on twitter about exceeding the PHP memory limit when saving comments: https://twitter.com/lourdas_v/status/1046323847526535168

I can report that I have been able to reproduce this problem. Perhaps we should bump it?

larsdesigns commented 6 years ago

Okay, I will do after lunch.

larsdesigns commented 6 years ago

I found the errors:

[30-Sep-2018 11:56:54 Europe/Athens] PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 130968 bytes) in /home/forum/repo/www/core/includes/module.inc on line 2504
[30-Sep-2018 11:57:14 Europe/Athens] PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 65552 bytes) in /home/forum/repo/www/core/includes/bootstrap.inc on line 2566
[30-Sep-2018 11:58:41 Europe/Athens] PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 65552 bytes) in /home/forum/repo/www/core/includes/common.inc on line 4249
[30-Sep-2018 11:58:59 Europe/Athens] PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 65552 bytes) in /home/forum/repo/www/core/includes/common.inc on line 4249
[01-Oct-2018 13:46:54 America/Los_Angeles] PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 65552 bytes) in /home/forum/repo/www/core/includes/bootstrap.inc on line 2566
[01-Oct-2018 13:47:02 America/Los_Angeles] PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 65552 bytes) in /home/forum/repo/www/core/includes/bootstrap.inc on line 2566

I have doubled the PHP memory limit.

larsdesigns commented 6 years ago

@jenlampton, Can you give it another test?

jenlampton commented 6 years ago

@larsdesigns yes, it's working for me now, thanks!

lourdas commented 6 years ago

Hi! Thanks for responding to my twitter message. But I'm wondering if the cause of the issue is something else than low memory limit. 256MB memory limit is I guess not low, instead I'd say just the opposite.

jenlampton commented 6 years ago

Thanks @lourdas, I agree we should do some profiling to track down the root cause of the memory consumption, but if we have the resources available on the server, then the fastest solution is to increase the memory limit.

If we can find (and fix!) a root cause, we should do that too -- but if we can do that work without inconveniencing people who are posting comments, we should :)

edit: I've created https://github.com/backdrop-ops/forum.backdropcms.org/issues/68 so we don't forget to research the root cause of the memory consumption issues.

stpaultim commented 5 years ago

Just want to report that I just experienced the same problem while previewing comments in the forum. and was able to reproduce it multiple times. I was able to SAVE my comments without any problem.

"Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 130968 bytes) in /home/forum/repo/www/core/includes/bootstrap.inc on line 3175"

Any other ideas?

lourdas commented 5 years ago

Ok, 512MB memory limit for PHP is way too much. There must be some kind of memory leak or something...

jenlampton commented 5 years ago

Yeah, I wonder what it is about a comment preview that needs so much memory? @larsdesigns are you interested in doing some local memory profiling on comment preview? Or, is anyone else available to work on https://github.com/backdrop-ops/forum.backdropcms.org/issues/68?

@stpaultim I copied your comment to the active issue.

larsdesigns commented 5 years ago

@jenlampton I am swamped with code projects and I want to focus on the bringing up the new servers for backdropcms.org before the new year.

lourdas commented 5 years ago

Today, I also got a Fatal error: Maximum execution time of 30 seconds exceeded in /home/forum/repo/www/core/modules/ckeditor/ckeditor.module on line 712 error. It seems that previewing a comment is almost impossible.

jenlampton commented 5 years ago

Okay, this sounds like a serious issue. I've disabled the preview of comments until we can get it sorted out, to minimize risk to everything else on the server.

@lourdas I also copied your comment to the open issue so it doesn't get lost.

jenlampton commented 5 years ago

Reminder: if you have problems with previewing comments or posts, please post them in Issue #68