Client intend to send too large body

  • Symptoms

    Uploading of big file size fails with the following error in /var/www/vhosts/system/ file:

    [error] 6045#0: *1543600 client intended to send too large body: 163625628 bytes, client:, server:, request: "POST /attachments/uploading.json?hash=bb192e03d44f11110881f1c148ef629&content_type=resource_version&key=resource HTTP/1.1", host: "", referrer: ""

    Nginx support is enabled on the server:

    /usr/local/psa/admin/bin/nginxmng -s 

    Adjusting of client_max_body_size in /etc/nginx/nginx.conf has no effect


    Value for client_max_body_size directive is overwritten on domain level and is insufficient.


    1. Connect to the server via SSH.

    2. Add the following directives to /usr/local/psa/admin/conf/panel.ini file using 'vi' utility to customize Plesk defaults:

      nginxClientMaxBodySize = 2000m

      If there is no /usr/local/psa/admin/conf/panel.ini file, create it from the sample file:

     cp /usr/local/psa/admin/conf/panel.ini.sample /usr/local/psa/admin/conf/panel.ini

    Rebuild web server configuration files:

     plesk sbin httpdmng --reconfigure-all

    Warning: Execution of the command above could cause a significant downtime of the hosted websites if there are a big number of them. Perform such action during the maintenance timeframe

    Adjust settings of PHP handler assigned to the domain. Log in to Plesk, go to Tools & Settings > PHP Settings > X.X.XX FPM application in php.ini tab and adjust the following parameters, e.g.:

    post_max_size 2000m
    upload_max_filesize 2000m
    max_file_uploads 100

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!