Skip to content
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

Large Images Cause Book Creation to Fail #4933

Open
aiquiti opened this issue Apr 9, 2024 · 2 comments
Open

Large Images Cause Book Creation to Fail #4933

aiquiti opened this issue Apr 9, 2024 · 2 comments
Labels

Comments

@aiquiti
Copy link

aiquiti commented Apr 9, 2024

Describe the Bug

If you try uploading a Cover image when creating a book, while it may show a preview making the user think that it uploaded successfully, it will fail to save and not provide any error or feedback to user. It doesn't seem to leave any error within logs as well.

I tested on two different instances (one used daily, the other more of a clean sandbox), both running on Ubuntu 22.04, with current latest version of BookStack (v24.02.3).

Uploading with a scaled down version of the image worked without issue.

Steps to Reproduce

  1. Create a book and enter a name for it
  2. Upload large photo (for my testing, I had a photo sized 5021 x 3370)
  3. Hit Save
  4. You will return to home screen without it saving or providing any feedback on it failing to save

Expected Behaviour

It would be expected either for it to throw an error stating that the picture is too large to upload, or otherwise scale the photo down as it does for the preview.

Screenshots or Additional Context

No response

Browser Details

No response

Exact BookStack Version

v24.02.3

@ssddanbrown
Copy link
Member

Hi @aiquiti,

Could I confirm if you checked the webserver error logs?
If not, please could you re-produce this error and provide back any detail from those logs, logged at the time of the error.
If so, please can you provide the relevant webserver access log line(s) for this failed request?

If you're not sure where to find those just let me know your original install method for BookStack and I'll provide some guidance.

@aiquiti
Copy link
Author

aiquiti commented Apr 9, 2024

Good call on webserver error logs, I originally just looked at BookStack's logs. The webserver logs reveal the following:

  • [mpm_prefork:notice] [pid 770] AH00163: Apache/2.4.52 (Ubuntu) OpenSSL/3.0.2 configured -- resuming normal operations
  • [core:notice] [pid 770] AH00094: Command line: '/usr/sbin/apache2'
  • [php:warn] [pid 137052] [client 10.100.200.1:63707] PHP Warning: POST Content-Length of 14427329 bytes exceeds the limit of 8388608 bytes in Unknown on line 0, referer: https://bookstack.domain.local/shelves/general/create-book
  • [php:warn] [pid 136638] [client 10.100.200.1:50587] PHP Warning: POST Content-Length of 14428671 bytes exceeds the limit of 8388608 bytes in Unknown on line 0, referer: https://bookstack.domain.local/create-book
  • [php:warn] [pid 137186] [client 10.100.200.1:58666] PHP Warning: POST Content-Length of 14427315 bytes exceeds the limit of 8388608 bytes in Unknown on line 0, referer: https://bookstack.domain.local/create-book
  • [php:warn] [pid 137186] [client 10.100.200.1:64878] PHP Warning: POST Content-Length of 14427313 bytes exceeds the limit of 8388608 bytes in Unknown on line 0, referer: https://bookstack.domain.local/create-book

While the access.log doesn't seem to have too much useful data, I've attached a snippet of when I started to realize there was issues: bookstack_access-log_240409.txt. It appears to not log anything too useful when I got booted back, but you can see when it worked when "...-small.png" is within the line.

And just for added context, I used the Ubuntu 22.04 Installation Script for my initial setup of BookStack. While I don't recall what release it would've been at the time, I had initially set it up near the end of 2022.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants