linuxserver / docker-bookstack

A Docker container for the BookStack documentation wiki
GNU General Public License v3.0
814 stars 109 forks source link

[BUG] Error uploading big images #207

Closed alfonsocasadodiez closed 8 months ago

alfonsocasadodiez commented 9 months ago

Is there an existing issue for this?

Current Behavior

When uploading somewhat big images we get the following error on Bookstack:

"Failed to handle image upload and/or create thumbnails due to system resource limits." CleanShot 2024-02-12 at 17 10 20

Image data: CleanShot 2024-02-12 at 17 09 50@2x

Expected Behavior

Image should upload without intervention

Steps To Reproduce

Take a big image and upload it to bookstack

Environment

- OS: Alpine Linux 
- How docker service was installed: Docker Alpine Linux LXC script: https://tteck.github.io/Proxmox/

CPU architecture

x86-64

Docker creation

Created via Portainer stack: 

version: "2"
services:
  bookstack:
    image: lscr.io/linuxserver/bookstack
    container_name: bookstack
    environment:
      - PUID=1000
      - PGID=1000
      - APP_URL=https://XXXXXXXXXX.com
      - DB_HOST=bookstack_db
      - DB_PORT=3306
      - DB_USER=XXXXXXXXXX
      - DB_PASS=XXXXXXXXXXXXXXXXXXXX
      - DB_DATABASE=bookstackapp
      - STORAGE_TYPE=local_secure
      - MAIL_DRIVER=smtp
      - MAIL_HOST=smtp.XXXXXXXXXX.com
      - MAIL_PORT=587
      - MAIL_ENCRYPTION=starttls
      - MAIL_USERNAME=XXXXXXXXXX@XXXXXXXXXX.com
      - MAIL_PASSWORD=XXXXXXXXXXXXXXXXXXXX
      - MAIL_FROM=servers@XXXXXXXXXX.com  
      - MAIL_FROM_NAME=XXXXXXXXXX
    volumes:
      - ./bookstack_app_data:/config
    ports:
      - 6875:80
    restart: unless-stopped
    depends_on:
      - bookstack_db
  bookstack_db:
    image: lscr.io/linuxserver/mariadb
    container_name: bookstack_db
    environment:
      - PUID=1000
      - PGID=1000
      - MYSQL_ROOT_PASSWORD=XXXXXXXXXXXXXXXXXXXX
      - TZ=Europe/London
      - MYSQL_DATABASE=XXXXXXXXXX
      - MYSQL_USER=XXXXXXXXXX
      - MYSQL_PASSWORD=XXXXXXXXXX
    volumes:
      - ./bookstack_db_data:/config
    restart: unless-stopped

Container logs

bookstack:~# docker logs bookstack
[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] 02-default-location: skipped
[migrations] done
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

using keys found in /config/keys
App Key found - setting variable for seds
Running config - DB_HOST set
Waiting for DB to be available

   INFO  Nothing to migrate.  

**** The following active confs have different version dates than the samples that are shipped. ****
**** This may be due to user customization or an update to the samples. ****
**** You should compare the following files to the samples in the same folder and update them. ****
**** Use the link at the top of the file to view the changelog. ****
┌────────────┬────────────┬────────────────────────────────────────────────────────────────────────┐
│  old date  │  new date  │ path                                                                   │
├────────────┼────────────┼────────────────────────────────────────────────────────────────────────┤
│ 2023-04-13 │ 2023-12-25 │ /config/nginx/site-confs/default.conf                                  │
└────────────┴────────────┴────────────────────────────────────────────────────────────────────────┘
[custom-init] No custom files found, skipping...
[ls.io-init] done.
[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] 02-default-location: skipped
[migrations] done
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

using keys found in /config/keys
App Key found - setting variable for seds
Running config - DB_HOST set
Waiting for DB to be available

   INFO  Nothing to migrate.  

**** The following active confs have different version dates than the samples that are shipped. ****
**** This may be due to user customization or an update to the samples. ****
**** You should compare the following files to the samples in the same folder and update them. ****
**** Use the link at the top of the file to view the changelog. ****
┌────────────┬────────────┬────────────────────────────────────────────────────────────────────────┐
│  old date  │  new date  │ path                                                                   │
├────────────┼────────────┼────────────────────────────────────────────────────────────────────────┤
│ 2023-04-13 │ 2023-12-25 │ /config/nginx/site-confs/default.conf                                  │
└────────────┴────────────┴────────────────────────────────────────────────────────────────────────┘
[custom-init] No custom files found, skipping...
[ls.io-init] done.
github-actions[bot] commented 9 months ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

j0nnymoe commented 9 months ago

We do not support our containers within lxc environments ( https://docs.linuxserver.io/misc/support-policy/#unsupported )

ssddanbrown commented 9 months ago

That typically happens when you hit PHP system memory limits. Within your ./bookstack_app_data/php/php-local.ini file try appending:

memory_limit = 512M
LinuxServer-CI commented 8 months ago

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

homerr commented 8 months ago

I've looked into this and cannot reproduce the error, I just uploaded a 3MB image file without issue.

I am running this container in production at work behind an lsio nginx container (not swag) reverse proxying into this. I can see the start-up logs showing that the default.conf differs from what it should be, so it would be worth restoring that to default and going from there. Further support, can be obtained in Discord.

github-actions[bot] commented 7 months ago

This issue is locked due to inactivity