-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Out of memory in parser #3799
Comments
Can you share the source of the post? |
Hm. Not that big of a document. I'll start thinking about this - thanks! |
I can reproduce similar excessive memory usage with Gutenberg on this post:
|
I believe that I know why it's occurring and it's probably because of how we're handling those freeform HTML blocks. we build a list of each character in the parser and then later join them into a single string. this was a fear of mine when converting to the nested parser with our move back to the idea of tokens (necessary) but not sure yet how to fix this. |
A follow-up to this in Gutenberg 2.0: the post loads and the memory issue is gone. Not sure if related to the fix or not, but when the post loads it has the raw HTML and the text is grey: The console shows an error: Attached the error log. When I convert this to blocks, it's done but some paragraphs and items within lists are stripped. |
Thanks for the follow ups, @nosolosw. :) |
I've been battle-testing Gutenberg again with this post I wrote 10 years ago. I've tried to convert it to blocks using Gutenberg 4.4:
cc @dmsnell @mcsf @mtias @aduth @youknowriad Going to see if I can bisect when this started to happen. Will post any follow ups here. |
@nosolosw could you report a new issue with it? |
Thanks for battle-testing and dog-fooding, @nosolosw. Out of curiosity, since this issue was originally about the parser, have you noticed any issues with calling the server-side parser on that post of yours? Because since #10463 we no longer skip the parser (as fixed in #4591) but rather use the improved parser implementation added in #8083. |
I wasn't able to become familiar with all Gutenberg components in these few weeks in the project, so I'm not sure what the server-side parsing means. I'm happy to try if I'm given some steps to reproduce. |
Oh, now that I had some coffee, it occurred to me that by server-side parsing you meant if the content within the classic block in Gutenberg was the same that the content in the classic editor? I've just compared both and yes, the content is equal. cc @mcsf |
😄
@nosolosw, actually I meant whether PHP's |
When trying to load a very old and large post from my blog and I get these errors:
As far as I've tested this fails randomly at lines 96, 349, or 372 of the parser when I reload the page.
I've tried with increasing the maximum file size allowed for the network but it didn't solve the issue. For context, if I deactivate the Gutenberg plugin, the post is loaded and shows the content.
Not sure how I can share any more details for debugging, just ping me and I'll provide what you need.
The text was updated successfully, but these errors were encountered: