Out of Memory while editing large page #1878

Closed
opened 2026-02-05 02:06:50 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @Zyzto on GitHub (Sep 30, 2020).

Describe the bug
Working on large document/page, after making 20~30 edits the process crash on browser and says "Code out of memory"

Steps To Reproduce
Steps to reproduce the behavior:
1.Edit Large page 5000+ words
2.Edit a number of areas and keep eye on ram usage on task manager
3.with each delete or edit, ram usage increases 200mb

Expected behavior
After number of edit on large page with 5000+ words, the browser process will run out of memory

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): BookStack v0.30.1
  • PHP Version: 7.2.24
  • Hosting Method (Nginx/Apache/Docker): Nginx

Additional context
history should only record in Differential way not the full data

Originally created by @Zyzto on GitHub (Sep 30, 2020). **Describe the bug** Working on large document/page, after making 20~30 edits the process crash on browser and says "Code out of memory" **Steps To Reproduce** Steps to reproduce the behavior: 1.Edit Large page 5000+ words 2.Edit a number of areas and keep eye on ram usage on task manager 3.with each delete or edit, ram usage increases 200mb **Expected behavior** After number of edit on large page with 5000+ words, the browser process will run out of memory **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings): BookStack v0.30.1 - PHP Version: 7.2.24 - Hosting Method (Nginx/Apache/Docker): Nginx **Additional context** history should only record in Differential way not the full data
Author
Owner

@ssddanbrown commented on GitHub (Sep 30, 2020):

Hi @Zyzto,
Thanks for reporting. I've tested this with some memory snapshotting within Firefox.

To get anywhere near the kind of memory increases you were experiencing I had to get content nearer to about 100k words. I suspect that an image has potentially become embedded within your content as base64 and that's causing a mass inflation of content. Could you double check the HTML content of your page and see if that's true?

Although a differential would be better it's not something I think would be worth spending time attempting to achieve at this time, with the intention of potentially changing editor in the future; Especially as there has been little issue with the existing method up to this point.

@ssddanbrown commented on GitHub (Sep 30, 2020): Hi @Zyzto, Thanks for reporting. I've tested this with some memory snapshotting within Firefox. To get anywhere near the kind of memory increases you were experiencing I had to get content nearer to about 100k words. I suspect that an image has potentially become embedded within your content as base64 and that's causing a mass inflation of content. Could you double check the HTML content of your page and see if that's true? Although a differential would be better it's not something I think would be worth spending time attempting to achieve at this time, with the intention of potentially changing editor in the future; Especially as there has been little issue with the existing method up to this point.
Author
Owner

@Zyzto commented on GitHub (Sep 30, 2020):

@ssddanbrown I think yeah it was base64 images cause I exported html from bookstack and copied it to another one, that explain how I copied an image to the editor.

@Zyzto commented on GitHub (Sep 30, 2020): @ssddanbrown I think yeah it was base64 images cause I exported html from bookstack and copied it to another one, that explain how I copied an image to the editor.
Author
Owner

@ssddanbrown commented on GitHub (Jan 16, 2021):

Since the cause was a base64 image I'll close this off, Happy to explore options though if this is seen on future large pages without such as base64 image.

@ssddanbrown commented on GitHub (Jan 16, 2021): Since the cause was a base64 image I'll close this off, Happy to explore options though if this is seen on future large pages without such as base64 image.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1878