• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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