Skip to content

Octane is ignoring php.ini and disabling large file uploads #1060

@ahmed-fawzy99

Description

@ahmed-fawzy99

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:

  1. Confirmed the php.ini settings: I have set this php configuration on both /etc/php/8.4/fpm/php.ini and /etc/php/8.4/cli/php.ini:
upload_max_filesize = 40M
post_max_size = 40M
memory_limit = 128M
  1. Checked Nginx configuration: Forge does this already, but manually checked Nginx config had client_max_body_size 40M;
  2. Made sure no Laravel limit on file uploads or file size validation set on the file uploaders.
  3. Tried changing from FrankenPHP to Swoole.
  4. 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

  1. Update php.ini with proper file uploading limits: upload_max_filesize = 40M, upload_max_filesize = 40M, and memory_limit = 128M
  2. Use FileUpload::make('attachment') on Filament.
  3. Use the default octane configuration on config/octane.php and set OCTANE_SERVER=frankenphp in .env file
  4. Run the server using php artisan octane:start --watch with .
  5. Upload any file larger than 2 MB

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions