• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Unable to upload large files via HTTP/HTTPS

AB M

New Pleskian
Hi all,
I've spent the past 3 days of my life with this issue, hope you guys can help me.
When posting fields with very long text (1MB) or uploading files larger than 1MB, it fails, and shows a 500 error on the Developer Console.
Grabbed all error logs in the system but nothing is mentioned anywhere.
PHP settings were set for way higher than 1MB in all system configuration files, and Plesk interface.

Googled and tried all the fixes including this one: Unable to upload large files via PHP: HTTP request length exceeds MaxRequestLen
but no luck :(

fcgi is set to:
memory_limit 128M for both local and master values
post_max_size 200M 180M
upload_max_filesize 200M 160M

Additinal Apache directives
<IfModule mod_fcgid.c>
MaxRequestLen 1073741824
FcgidMaxRequestLen 1073741824
FcgidMaxRequestsPerProcess 1000
FcgidProcessLifeTime 7200
</IfModule>

What am I missing?
Please help !
 
If it is a webserver upload, this could maybe be caused by the body size limit of Nginx. You can try to expand the body size limit to 1 GB for example.

Add into httpd { } section of /etc/nginx/nginx.conf:
Code:
client_max_body_size 1G;

Add to /usr/local/psa/admin/conf/panel.ini:
Code:
[webserver]

nginxClientMaxBodySize =
Including the empty line between the bracket header and the entry. It is correct and desired, that the equal sign is not followed by any value. This keeps Plesk from adding a default client_max_body_size directive to Nginx files and enables user-individual Nginx directives for it.

After the changes:
# service nginx reload

Maybe the individual domain needs a reconfiguration, too:
Apply any change to the domain configuration through GUI for it, so that the web server configuration files of the virtual host are re-created and the client_max_body_size is omitted in the Nginx virtual host configuration files.
 
If possible, could you please explain in more detail how filesize upload limit is linked to MySQL or where in the documentation that you provided this issue is described? This would be very helpful for future reference.
 
In my case, the issue had nothing to do with PHP or Apache.
And since the upload / post parameters are controlled from the code and php/apache configurations I thought, -as it might happen to many - that the problem was there.
But it was not.
If your settings are correct and you are using an old version of MySQL, make sure you upgrade it to at least 5.7.20 to avoid the bug that will prevent you from posting very long text to the database.
Cheers!
 
Back
Top