Error when uploading larger files - 413 Request Entity Too Large #4247

Closed
opened 2026-02-05 08:21:00 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @towerplease on GitHub (Sep 28, 2023).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

When uploading a file, which is larger then the default 100M filesize, an error occurs:

<html> <head><title>413 Request Entity Too Large</title></head> <body> <center><h1>413 Request Entity Too Large</h1></center> <hr><center>cloudflare</center> <script defer src="https://static.cloudflareinsights.com/beacon.min.js/v8b253dfea2ab4077af8c6f58422dfbfd1689876627854" integrity="sha512-bjgnUKX4azu3dLTVtie9u6TKqgx29RBwfj3QXYt5EKfWM/9hPSAI/4qcV5NACjwAo8UtTeWefx6Zq5PHcMm7Tg==" data-cf-beacon='{"rayId":"80dce51d29821942","version":"2023.8.0","r":1,"token":"9e91dfbf501c4af4810267fd04e04f79","si":100}' crossorigin="anonymous"></script> </body> </html>

I use dockerized bookstack instance and have configured 2GB filesize upload:

php-local.ini:

; Edit this file to override php.ini directives

date.timezone = "Europe/Berlin"
upload_max_filesize = 2000M
post_max_size = 2000M

.env:

# File Upload Limit
# Maximum file size, in megabytes, that can be uploaded to the system.
FILE_UPLOAD_SIZE_LIMIT=2000

I restarted the container, also the hostsystem, multiple times. But it seems the configuration is not applied.
I also tried different browser and incognito mode.

Files below 100M can be uploaded without any issue.

Is there a way to see the upload filesize limit used from php?

Thanks in advance!

Exact BookStack Version

23.8.03

Log Content

Nothing written in log regarding this issue.

Hosting Environment

ubuntu 22.04 Host -> dockerized installation - linuxserver.io - latest.
Installed with docker compose via portainer.

Originally created by @towerplease on GitHub (Sep 28, 2023). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario When uploading a file, which is larger then the default 100M filesize, an error occurs: ``` <html> <head><title>413 Request Entity Too Large</title></head> <body> <center><h1>413 Request Entity Too Large</h1></center> <hr><center>cloudflare</center> <script defer src="https://static.cloudflareinsights.com/beacon.min.js/v8b253dfea2ab4077af8c6f58422dfbfd1689876627854" integrity="sha512-bjgnUKX4azu3dLTVtie9u6TKqgx29RBwfj3QXYt5EKfWM/9hPSAI/4qcV5NACjwAo8UtTeWefx6Zq5PHcMm7Tg==" data-cf-beacon='{"rayId":"80dce51d29821942","version":"2023.8.0","r":1,"token":"9e91dfbf501c4af4810267fd04e04f79","si":100}' crossorigin="anonymous"></script> </body> </html> ``` I use dockerized bookstack instance and have configured 2GB filesize upload: php-local.ini: ``` ; Edit this file to override php.ini directives date.timezone = "Europe/Berlin" upload_max_filesize = 2000M post_max_size = 2000M ``` .env: ``` # File Upload Limit # Maximum file size, in megabytes, that can be uploaded to the system. FILE_UPLOAD_SIZE_LIMIT=2000 ``` I restarted the container, also the hostsystem, multiple times. But it seems the configuration is not applied. I also tried different browser and incognito mode. Files below 100M can be uploaded without any issue. Is there a way to see the upload filesize limit used from php? Thanks in advance! ### Exact BookStack Version 23.8.03 ### Log Content Nothing written in log regarding this issue. ### Hosting Environment ubuntu 22.04 Host -> dockerized installation - linuxserver.io - latest. Installed with docker compose via portainer.
OVERLORD added the 🐕 Support label 2026-02-05 08:21:00 +03:00
Author
Owner

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

I'm pretty sure you're hitting Cloudflare's upload limit there, especially as the 413 response is coming from Cloudflare and 100M is a common Cloudlfare limit.

@ssddanbrown commented on GitHub (Sep 28, 2023): I'm pretty sure you're hitting Cloudflare's upload limit there, especially as the 413 response is coming from Cloudflare and 100M is a common Cloudlfare limit.
Author
Owner

@towerplease commented on GitHub (Sep 28, 2023):

Oh boy... you are right. I totally forgot about cloudflares limit :(

Thanks Dan, case closed!

@towerplease commented on GitHub (Sep 28, 2023): Oh boy... you are right. I totally forgot about cloudflares limit :( Thanks Dan, case closed!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#4247