The error you're encountering, "413 Content Too Large," typically indicates that the server is rejecting the request because the payload is larger than the server is configured to accept. You've already adjusted several settings, but let's ensure everything is covered:
-
PHP Configuration: You've mentioned setting
upload_max_filesize,post_max_size, andmemory_limitinphp.ini. Make sure these changes are applied to the correctphp.inifile. You can verify whichphp.inifile is being used by runningphpinfo()in a PHP script. -
Nginx Configuration: You've set
client_max_body_sizeto100Min your Nginx configuration. Ensure this directive is set in the correct server block and that the configuration file is being loaded. After making changes, restart Nginx withsudo systemctl restart nginx. -
Laravel Configuration: Ensure that there are no additional middleware or configurations in Laravel that might be limiting the upload size. Check
config/filesystems.phpand any custom middleware that might be affecting file uploads. -
Filament Configuration: You've set the
maxSizein Filament'sFileUploadcomponent. This should be fine, but ensure that this setting is correctly applied in your Filament form. -
Server Logs: Check the Nginx and PHP-FPM logs for any additional errors or warnings that might provide more context.
-
Testing: After making these changes, restart both Nginx and PHP-FPM to ensure all configurations are reloaded. You can do this with:
sudo systemctl restart nginx sudo systemctl restart php-fpm -
Cross-Check: Double-check that there are no other services or proxies (like a load balancer) that might be imposing their own limits on request sizes.
If all configurations are correct and the issue persists, consider testing with a smaller increment in file size to see if there's a specific threshold where the error occurs, which might help in diagnosing the problem further.