• 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!
  • 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.

client intended to send too large body

Daniel123

New Pleskian
Hello,

I have been using Plesk for a while on my server, but this is the first time that I need to set up large files uploading for a client who requires to upload via a form files that are larger than 128MB (but less than 400).

The issue I've been seeing is that whenever the user tries to upload a file greater than 128MB I see an error on the proxy_error_log that says:

2015/05/10 21:46:18 [error] 31224#0: *9 client intended to send too large body: 175420278 bytes, client: XX.XX.XX.XX, server: myserver.com , request: "POST /admin/products/1 HTTP/1.1", host: "myserver.com", referrer: "referrer"

I've been googling this issue and everything points to the nginx configuration (PHP parameters have already been set up). I proceeded to change the configuration of /etc/nginx/nginx.conf to include

http {
...
client_max_body_size 400M;
...
}

HOWEVER (and this is where I'm stuck) after restarting the nginx service, the fille /etc/nginx/plesk.conf.d/vhosts/myserver.com.conf continues to hold the value:

server {
...
client_max_body_size 128m;
...
}

Modifying this file to change the 128m to 400m does not make a difference.

Any thoughts or recommendations would be greatly appreciated!
 
Hi Daniel123,

please keep in mind, that additional nginx settings are done over the Plesk Control Panel at your domain specific webserver settings "Additional nginx directives" ( Websites & Domains > YOUR - Domainname > Web Server Settings ) and will result in entries at "/var/www/vhosts/system/YOUR_DOMAIN.COM/conf/vhost_nginx.conf".


If you experience issues, while adding additional nginx settings, as for example:
Code:
Invalid nginx configuration: nginx: [emerg] "client_max_body_size" directive is duplicate
... please visit the Parallels/Odin Knowledge Base :

 
Thank you for the reference.

However, there's no panel.ini anywhere in my server, just a panel.ini.sample

Thoughts?
 
Hi Daniel123,

the SAMPLE might be copied to "/usr/local/psa/admin/conf/panel.ini" in order to work with the desired configurations.
 
Ok, so I already did that, followed the instructions as suggested.

Restarted the nginx service, but when trying to add the client_max_body_size directive, I keep getting the same error:

Invalid nginx configuration: nginx: [emerg] "client_max_body_size" directive is duplicate in /var/www/vhosts/system/myserver.com/conf/vhost_nginx.conf:2 nginx: configuration file /etc/nginx/nginx.conf test failed

I can confirm the new panel.ini seems to be working, because the value of client_max_body_size in /etc/nginx/plesk.conf.d/vhosts/myserver.com.conf is the same as in panel.ini
 
Hi Daniel123,

when you used "/usr/local/psa/admin/bin/httpdmng --reconfigure-all" to reconfigure your configuration files, your additional definitions from your "panel.ini" will conflict with additional settings at "/var/www/vhosts/system/YOUR_DOMAIN.COM/conf/vhost_nginx.conf", as you can see in your error message - you should use either one or the other method as described earlier to avoid double entries.
 
Last edited by a moderator:
Removed any client_max_body_size entries from /etc/nginx/plesk.conf.d/vhosts/myserver.com.conf, restarted nginx and tried uploading a large file again. However the problem points now to a different component.

From error_log:

[Tue May 12 13:23:51 2015] [warn] [client 142.46.224.10] mod_fcgid: HTTP request length 134223089 (so far) exceeds MaxRequestLen (134217728), referer:

Looks like fcgid still needed to be configured. So I took a similar approach as before, and added the directive FcgidMaxRequestLen 400000000 as an additional directive for HTTP. Saved, restarted Apache and everything works now.
 
Back
Top