-
Notifications
You must be signed in to change notification settings - Fork 323
Description
Octane Version
2.9
Laravel Version
12.28
PHP Version
8.4
What server type are you using?
FrankenPHP
Server Version
Ubuntu 22.4 | Deployed with Laravel Forge
Database Driver & Version
PostgreSQL 17
Description
Every File upload I attempt larger than 2 MB on Filament fails. I don't see any errors in the logs, but I inspected the network requests from the browser and the errors are "413 | Request entity too large - nginx".
We're using Laravel Octane (FrankenPHP) on Forge (Ubuntu on DigitalOcean) and outside of this issue it's working fine. I'm also having the same issue running locally.
Steps to address the issue:
- Confirmed the
php.inisettings: I have set this php configuration on both/etc/php/8.4/fpm/php.iniand/etc/php/8.4/cli/php.ini:
upload_max_filesize = 40M
post_max_size = 40M
memory_limit = 128M- Checked Nginx configuration: Forge does this already, but manually checked Nginx config had
client_max_body_size 40M; - Made sure no Laravel limit on file uploads or file size validation set on the file uploaders.
- Tried changing from FrankenPHP to Swoole.
- Restarted the services after each configuration update.
The issue still persists after all, but when I turned Octane off and switched to regular PHP-FPM pool and the uploads were working just fine as expected both on Forge and locally (using artisan serve).
It seems Octane is forcing a 2 MB limit since this is PHP's default, but I cannot find any other PHP configuration files other than the cli and the fpm on my server as these are the only 2 php configuration files found.
Steps To Reproduce
- Update
php.iniwith proper file uploading limits:upload_max_filesize = 40M,upload_max_filesize = 40M, andmemory_limit = 128M - Use
FileUpload::make('attachment')on Filament. - Use the default octane configuration on
config/octane.phpand setOCTANE_SERVER=frankenphpin.envfile - Run the server using
php artisan octane:start --watchwith . - Upload any file larger than 2 MB