• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved 413 Request Entity Too Large

geco68230

New Pleskian
Hi,

I'm running a system on wordpress that allows me to download large zip files (up to 780M).

Until now I was on ISPConfig and to allow this I used the following queries.

for custom php.ini settings :
Max_execution_time = 6000000;
Upload_max_filesize = 500M;
Post_max_size = 500M;
Memory_limit = 512M;

for Apache settings:
FCgidMaxRequestLen 900000000
Php_admin_value post_max_size 500M
Php_admin_value upload_max_filesize 500M
Timeout 60000


But that does not work on Plesk.
Currently I put this for PHP settings:
max_execution_time = 6000000;
upload_max_filesize = 780M;
post_max_size = 780M;
memory_limit = 512M;
max_input_vars = 10000
max_input_time = 4000

And that for Apache:
<IfModule mod_fcgid.c>
FcgidMaxRequestLen 1073741824
FcgidMaxRequestsPerProcess 100
FcgidProcessLifeTime 7200
</IfModule>


But that does not seem to be enough.
Here is the error that appears in the logs when I try to upload a file superior to 300M:
413 Request Entity Too Large
nginx, status=413, responseHeaders=Date: Tue, 06 Dec 2016 11:20:18 GMT Server: nginx Connection: close Content-Length: 594 Content-Type: text/html
[StateChanged] STOPPED
[UploadComplete]


Please could you tell me what i need to do ?
It seems to be a problem with Nginx...
 
Hi geco68230,

you could use the (custom/additional ) "nginxClientMaxBodySize" setting at your "/usr/local/psa/admin/conf/panel.ini" ( if this file isn't existent yet, then pls. copy the SAMPLE with the example commands over your command line ( as user "root" ): => "cp /usr/local/psa/admin/conf/panel.ini.sample /usr/local/psa/admin/conf/panel.ini" ). The STANDARD here would be "128m" ( 128 MB ), so you might use in your "panel.ini"
Code:
...
[webserver]
nginxClientMaxBodySize = 128m
...
followed by the command "plesk sbin httpdmng --reconfigure-all" and "service nginx restart". You have now the possibility to define a custom definition AT EACH (sub)domain :

Home > Subscriptions > (SUBDOMAIN.)YOUR-DOMAIN.COM > Apache & nginx Settings > ( textbox) Additional nginx directives

... with for example:
Code:
client_max_body_size 780m
( clicking on "OK" or "APPLY" at the bottom of the site will start the webserver - configuration - build - process for the (sub)domain and restart nginx. Other (sub)domains on your server will still use the standard "128 MB". )
 
Last edited by a moderator:
Invalid nginx configuration: nginx: [emerg] unexpected end of file, expecting ";" or "}" in /var/www/vhosts/system/vidwe.net/conf/vhost_nginx.conf:1 nginx: configuration file /etc/nginx/nginx.conf test failed
 
Hi yusuf,

Invalid nginx configuration: nginx: [emerg] unexpected end of file, expecting ";" or "}"
as you can see within your error message, you have a MISSING ";" or "}" at your additional configuration.

Nginx always expects a ";" at the end of a setting. ;)
 
i have this error
Invalid nginx configuration: nginx: [emerg] "client_max_body_size" directive is duplicate in /var/www/vhosts/system/zippyloads.com/conf/vhost_nginx.conf:1 nginx: configuration file /etc/nginx/nginx.conf test failed
 
okey the problem about duplicate is resolved

you said to add two lines to /usr/local/psa/admin/conf/panel.ini
...
[webserver]
nginxClientMaxBodySize = 128m
...
and that cause duplicate problem you should add this

...
[webserver]
nginxClientMaxBodySize =
...

without 128m value

thanks

 
Hi yusuf,

the suggestions at => #2 where valid at "Dec 6, 2016" for Plesk 12.5, tested and afterwards the thread has been marked as solved.

If you experience, that previous suggestions and resolutions at this forum might not suit your needs, it could be that you use a completely different Plesk version or/and ( in this special case! ) different Plesk webserver configuration templates, so that the suggestions and resolutions will conflict with your actual Plesk version used on your server right now.

Pls. consider to open a NEW thread in the future, if you experience issues/errors/problems with Plesk, as you might get suggestions from people willing to help you for YOUR actual operating system and the current used Plesk version(s), based on an actual investigation. ;)
 
I'm having the same issue with Plesk 18.0.61 Update 5 and setting the nginxClientMaxBodySize to 2000m didn't change anything. What could I do now?
 
Back
Top