Posts

Showing posts from February, 2021

[Solved] Big File Size: Cannot upload file through Nginx Error 500

Reference: https://ofstack.com/Nginx/17070/nginx-upload-file-size-error-500-solution.html TL:DR; Add `client_body_buffer_size 100M;` in nginx.conf, besides client_max_body_size, then restart nginx. --  The symptoms are as follow: We have an Nginx server that routes traffic to internal Wordpress CMS When user uploads file through media page in WP, only file in small size (< 10K) can be uploaded, while file with large size (e.g. > 1M and <= 2M) cannot be uploaded. The error is: "Post-processing of the image failed likely because the server is busy or does not have enough resources. Uploading a smaller image may help. Suggested maximum size is 2500 pixels." Strictly speaking, this is a PHP image library error, not WP error.  You cannot find this error in WP source code WP is hosted on Apache server. PHP post size, max size is setting to 80M (or any other large values) in php.ini. Nginx client client_max_body_size is set to 10M (or any other large value) No error logs WP