Image Gallery not loading #4232

Closed
opened 2026-02-05 08:18:12 +03:00 by OVERLORD · 5 comments
Owner

Originally created by @starikh on GitHub (Sep 22, 2023).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

Unable to load image gallery (infinity loop)
Able to load images directly to page editor.

Browser Console errors:
image
Bookstack behind nginx reverse proxy
After upgrading to latest (No changes in my .env) and creating few new books i unable to use Image Gallery.

Exact BookStack Version

v23.08.3

Log Content

last rows of log


[2023-09-22 14:15:48] production.ERROR: Allowed memory size of 134217728 bytes exhausted (tried to allocate 47994444 bytes) {"userId":7,"exception":"[object] (Symfony\\Compo>
[stacktrace]
#0 {main}
"}
[2023-09-22 14:17:01] production.ERROR: Allowed memory size of 134217728 bytes exhausted (tried to allocate 47994444 bytes) {"userId":7,"exception":"[object] (Symfony\\Compo>
[stacktrace]
#0 {main}
"}
[2023-09-22 14:18:34] production.ERROR: Allowed memory size of 134217728 bytes exhausted (tried to allocate 47994444 bytes) {"userId":7,"exception":"[object] (Symfony\\Compo>
[stacktrace]
#0 {main}
"}
[2023-09-22 14:24:38] production.ERROR: Allowed memory size of 134217728 bytes exhausted (tried to allocate 47994444 bytes) {"userId":7,"exception":"[object] (Symfony\\Compo>
[stacktrace]
#0 {main}
"}
[2023-09-22 14:34:38] production.ERROR: Allowed memory size of 134217728 bytes exhausted (tried to allocate 47994444 bytes) {"userId":7,"exception":"[object] (Symfony\\Compo>
[stacktrace]
#0 {main}
"}
[2023-09-22 14:36:04] production.ERROR: Allowed memory size of 134217728 bytes exhausted (tried to allocate 47994444 bytes) {"userId":7,"exception":"[object] (Symfony\\Compo>
[stacktrace]
#0 {main}
"}

Hosting Environment

PHP 8.2.10
mysql Ver 15.1 Distrib 10.11.5-MariaDB
Nginx 1.24.0
Portainer BE 2.19.0
Nginx Reverse Proxy 2.10.4
APP_URL=http://wiki.my-domain.com
STORAGE_TYPE=local

Originally created by @starikh on GitHub (Sep 22, 2023). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario Unable to load image gallery (infinity loop) Able to load images directly to page editor. Browser Console errors: ![image](https://github.com/BookStackApp/BookStack/assets/34922451/22685070-55a4-4454-a895-bf4c778f891e) Bookstack behind nginx reverse proxy After upgrading to latest (No changes in my .env) and creating few new books i unable to use Image Gallery. ### Exact BookStack Version v23.08.3 ### Log Content last rows of log ``` [2023-09-22 14:15:48] production.ERROR: Allowed memory size of 134217728 bytes exhausted (tried to allocate 47994444 bytes) {"userId":7,"exception":"[object] (Symfony\\Compo> [stacktrace] #0 {main} "} [2023-09-22 14:17:01] production.ERROR: Allowed memory size of 134217728 bytes exhausted (tried to allocate 47994444 bytes) {"userId":7,"exception":"[object] (Symfony\\Compo> [stacktrace] #0 {main} "} [2023-09-22 14:18:34] production.ERROR: Allowed memory size of 134217728 bytes exhausted (tried to allocate 47994444 bytes) {"userId":7,"exception":"[object] (Symfony\\Compo> [stacktrace] #0 {main} "} [2023-09-22 14:24:38] production.ERROR: Allowed memory size of 134217728 bytes exhausted (tried to allocate 47994444 bytes) {"userId":7,"exception":"[object] (Symfony\\Compo> [stacktrace] #0 {main} "} [2023-09-22 14:34:38] production.ERROR: Allowed memory size of 134217728 bytes exhausted (tried to allocate 47994444 bytes) {"userId":7,"exception":"[object] (Symfony\\Compo> [stacktrace] #0 {main} "} [2023-09-22 14:36:04] production.ERROR: Allowed memory size of 134217728 bytes exhausted (tried to allocate 47994444 bytes) {"userId":7,"exception":"[object] (Symfony\\Compo> [stacktrace] #0 {main} "} ``` ### Hosting Environment PHP 8.2.10 mysql Ver 15.1 Distrib 10.11.5-MariaDB Nginx 1.24.0 Portainer BE 2.19.0 Nginx Reverse Proxy 2.10.4 APP_URL=http://wiki.my-domain.com STORAGE_TYPE=local
OVERLORD added the 🐕 Support label 2026-02-05 08:18:12 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Sep 22, 2023):

Hi @starikh,
This can be common when an image has been uploaded but BookStack does not have enough memory available to create thumbnails, so can often occur when a particularly large image has been uploaded.
I have #4454 open to make the failure handling a bit more graceful in the next feature release.

This can usually be addressed though by raising the PHP memory limit for BookStack. By default the PHP memory_limit can be quite low.
If you need help to up the memory limit, just let me know what container image you're using for BookStack since different containers have different ways of doing things.

@ssddanbrown commented on GitHub (Sep 22, 2023): Hi @starikh, This can be common when an image has been uploaded but BookStack does not have enough memory available to create thumbnails, so can often occur when a particularly large image has been uploaded. I have #4454 open to make the failure handling a bit more graceful in the next feature release. This can usually be addressed though by raising the PHP memory limit for BookStack. By default the PHP `memory_limit` can be quite low. If you need help to up the memory limit, just let me know what container image you're using for BookStack since different containers have different ways of doing things.
Author
Owner

@starikh commented on GitHub (Sep 25, 2023):

That would be great, Im using docker-compose linuxserver/bookstack.

@starikh commented on GitHub (Sep 25, 2023): That would be great, Im using docker-compose linuxserver/bookstack.
Author
Owner

@ssddanbrown commented on GitHub (Sep 25, 2023):

@starikh Okay, within the mounted /config volume folder for the app container, you should have a php/php-local.ini file.
Within that add a memory_limit = 512M line. Then restart the app container.
I think that should help things, although I haven't tested that myself, just looked at one of my old set-ups as a reference.

@ssddanbrown commented on GitHub (Sep 25, 2023): @starikh Okay, within the mounted `/config` volume folder for the app container, you should have a `php/php-local.ini` file. Within that add a `memory_limit = 512M` line. Then restart the app container. I think that should help things, although I haven't tested that myself, just looked at one of my old set-ups as a reference.
Author
Owner

@starikh commented on GitHub (Oct 2, 2023):

It works, thanks!

@starikh commented on GitHub (Oct 2, 2023): It works, thanks!
Author
Owner

@Glitch3dPenguin commented on GitHub (Apr 9, 2025):

I wanted to chime in that I was also having this issue. Making the php/php-local.ini change that was mentioned by @ssddanbrown ALSO fixed this issue for me as well.

@Glitch3dPenguin commented on GitHub (Apr 9, 2025): I wanted to chime in that I was also having this issue. Making the `php/php-local.ini` change that was mentioned by @ssddanbrown ALSO fixed this issue for me as well.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#4232