backdrop-ops / forum.backdropcms.org

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

Profile comment submissions & node previews - find out why so much memory is used #68

Closed jenlampton closed 4 years ago

jenlampton commented 5 years ago

Follow up to https://github.com/backdrop-ops/forum.backdropcms.org/issues/67#issuecomment-427368940

We got a complaint on twitter about exceeding the PHP memory limit when saving comments: twitter.com/lourdas_v/status/1046323847526535168 I can report that I have been able to reproduce this problem. Perhaps we should bump it?

jenlampton commented 5 years ago

There are new comments on https://github.com/backdrop-ops/forum.backdropcms.org/issues/67 about this issue from @stpaultim

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?

larsdesigns commented 5 years ago

I doubled the allocated memory again and I also increased APC memory to 512 from 128.

I feel like we should examine the summit function(s) for the forms that are exhausting the memory.

jenlampton commented 5 years ago

Comment from @lourdas on https://github.com/backdrop-ops/forum.backdropcms.org/issues/67

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.

stpaultim commented 5 years ago

Looks like I was commenting on the wrong issue, cutting and pasting this from #67:

Looks like this is happening with new forum posts as well. It came up in forum over the last couple of days/weeks. https://forum.backdropcms.org/forum/forum-preview-throws-error https://forum.backdropcms.org/forum/errors-when-submitting-forum-topics

jenlampton commented 5 years ago

From @stpaultim

Looks like both Luke and I experienced this problem today. If we are not able to resolve the problem, can we turn off "preview" option?

I don't see an option to disable preview on posts. Maybe we should add one?

jenlampton commented 5 years ago

For now, I have added #access = FALSE to the preview button. It's a hack, but it should stop people form loosing their content.

jenlampton commented 5 years ago

I've merged https://github.com/backdrop-ops/forum.backdropcms.org/pull/70 which should help with the memory consumption issues. Let's see how it goes, and everyone please thank @hosef for looking into the issue!

stpaultim commented 5 years ago

Thanks @hosef for looking into this, but I think it's still an issue. I just tried previewing a comment and got a memory error and when I tried to preview a test forum topic I got a Page not Found error (I am not sure if this is the same problem or a different problem - should I open a new tickete)?

page_not_found___backdrop_forum

stpaultim commented 5 years ago

OK, after more research. Different things happen in different situations:

1) Preview on creation of a new comment - works fine

2) Preview while editing a new comment - "Fatal error: Maximum execution time of 30 seconds exceeded in /home/forum/repo/www/core/modules/field/field.attach.inc on line 616"

3) Preview while creating a new topic - "page not found"

jenlampton commented 5 years ago

@hosef do you have time to look into this?

quinnanya commented 5 years ago

Just tested and can confirm 1 and 3 (preview on creation of a new comment - works fine, and preview when creating a new topic - "page not found").

hosef commented 5 years ago
  1. @stpaultim I am not able to reproduce this. Could you let me know how you found this?

  2. I think this is a core issue. If you manually change the preview URL from forum_topic to forum-topic, so I don't think the node module is properly handling node types with an _ in them. This was probably caused with the rework to node previews that happened recently.

hosef commented 5 years ago

I just checked, and 3 is fixed in the latest version of Backdrop. backdrop/backdrop-issues#3336

jenlampton commented 5 years ago

Thanks @hosef ! I've applied that patch and pushed to forum.backdropcms.org. Can someone please confirm the page not found preview issue has been resolved? After that we just need to sort out #2. Perhaps it only happens on a large forum post, or maybe one with a lot of comments?

lourdas commented 5 years ago

I'm 3 hours away from 2019 (here...) and you're committing code people? :)

Happy New Year everyone! I hope Backdrop will gain more audience and more developers for a better CMS!

jenlampton commented 5 years ago

and you're committing code people? :)

Whenever there's a spare moment!

Happy New Year everyone! I hope Backdrop will gain more audience and more developers for a better CMS!

yes, Happy NYE to all! (and I wish for the same!)

stpaultim commented 5 years ago

Item #2 is still generating the Fatal error: Maximum execution time of 30 seconds exceeded in /home/forum/repo/www/core/includes/database/database.inc on line 826 message for me.

Steps to reproduce: 1) Comment on an topic in the forum 2) Try to edit your comment 3) While in edit mode, try to preview your changes.

I can no longer recreate this problem - 3) Preview while creating a new topic - "page not found". It seems to be fixed.

stpaultim commented 5 years ago

@jenlampton - In regard to our conversation during the meeting last week. This seems like a edge case and probably does not warrant turning off the preview option for now (in my opinion). However, I think it is something we need to try and fix. It does not put Backdrop in a good light if you get errors while trying to use the site and ask questions.

jenlampton commented 5 years ago

it is something we need to try and fix

Yes of course. But should we disable comment preview until it's fixed?

Comment on an topic in the forum

Which topic did you use when it happened for you? If it did not happen for others, I expect the topic might matter.

stpaultim commented 5 years ago

I tried it multiple times on multiple different topics. Short topics and long topics. As a moderator, I also tried it while editing a comment that was not my own. Same result every time.

hosef commented 5 years ago

So, it turns out this is the same issue as I originally fixed. I made a pull request that should fix it, but the change seems really hackish. If anyone has a suggestion to improve it, that would be great.

jenlampton commented 5 years ago

Thanks @hosef, I've merged your PR to resolve the issue, but added a @todo comment so we can revisit that approach later, if needed.

@stpaultim want to give it one final test, and then close this issue if resolved?