Unable to upload file using application or attach it in webmail: 413 Request Entity Too Large

Created:

2016-11-16 13:07:31 UTC

Modified:

2017-08-08 13:08:58 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to upload file using application or attach it in webmail: 413 Request Entity Too Large

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 12.0 for Linux

Symptoms

Unable to upload file using Application or attach it in webmail:

following error appears:

413 Request Entity Too Large

Cause

Upload restriction in Nginx configuration.

Resolution

  1. Add the following line to /etc/nginx/nginx.conf in http section:

    client_max_body_size 100;
  2. Restart the Nginx service:

    # service nginx restart
Have more questions? Submit a request

6 Comments

  • 0
    Avatar
    adrianTNT

    I am getting the same error after I did this.

    Editing the right config files of apache, nginx and fcgid variables is always a guessing game with Plesk, this article too.

     

  • 0
    Avatar
    Nikolay Zhmuk

    Hi, could you clarify what value you specified for client_max_body_size parameter and did you try to increase it when you get an error once again?

  • 1
    Avatar
    adrianTNT

    I remember I tried with this value in nginx.conf:

    client_max_body_size 0;

    trying to disable the limit, but it had no effect, another value I tried was client_max_body_size 512M; (I now see that this article is not showing the "M" after number), not sure if that is correct.

    it worked once I edited panel.ini with instructions from another article. 

    I think this value was overwritten by the individual vhost files created on each domain folder because a default client_max_body_size value was still written there by plesk regardless of nginx.conf

  • 0
    Avatar
    Karan634

    I'm getting the same error. Unable to fix it. there are so many config files in the server. I don't know which one to edit. Please tell me which file to edit to remove the error.

     

    Thanks.

  • 0
    Avatar
    Karan634

    I fixed mine by editing the

    /etc/nginx/plesk.conf.d/ip_default/(your-website-domain-name-goes-here.conf)

    and change  client_max_body_size to your desired vale and restart nginx. Make sure that there are two client_max_body_size, you have to make changes to both of them.

  • 0
    Avatar
    Vitaly Zhidkov

    @Karan634, the changes you made will be rewritten in case you change website configuration in Plesk. Try to edit the /etc/nginx/nginx.conf file.

Please sign in to leave a comment.