Posts by L4K3D3V1L

    Symptoms

    Uploading of big file size fails with the following error in /var/www/vhosts/system/example.com/logs/proxy_error_log file:



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



    Nginx support is enabled on the server:


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

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

    Cause

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

    Resolution

    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:

      Code
      [webserver]
      nginxClientMaxBodySize = 2000m

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


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

    Rebuild web server configuration files:


    Code
     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.:

    Code
    post_max_size 2000m
    upload_max_filesize 2000m
    max_file_uploads 100

    Symptoms

    Uploading of big file size fails with the following error in /var/www/vhosts/system/example.com/logs/proxy_error_log file:



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



    Nginx support is enabled on the server:


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

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

    Cause

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

    Resolution

    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:

      Code
      [webserver]
      nginxClientMaxBodySize = 2000m

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


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

    Rebuild web server configuration files:

    Code
     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.:

    Code
    post_max_size 2000m
    upload_max_filesize 2000m
    max_file_uploads 100