Join the community today
Become a Member

Nginx Error 413 >100MB

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Ethic, Aug 30, 2017.

Tags:
  1. Ethic

    Ethic New Member

    6
    3
    3
    Aug 30, 2017
    Ratings:
    +3
    Local Time:
    10:36 PM
    Please fill in any relevant information that applies to you:
    • CentOS Version: CentOS Linux release 7.3.1611 (Core)
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: 1.13.1
    • PHP Version Installed: PHP Version 7.1.6
    • Persistent Config:
    Code:
    NGXDYNAMIC_STREAM='n'
    NGXDYNAMIC_FANCYINDEX='n'
    NGXDYNAMIC_IMAGEFILTER='n'
    
    NGINX_STREAM='n'
    NGINX_STREAMGEOIP='n'
    NGINX_STREAMREALIP='n'
    NGINX_STREAMSSLPREREAD='n'
    
    NGINX_IMAGEFILTER='n'
    
    NGINX_SECURELINK='n'
    
    NGINX_FANCYINDEX='n'
    
    NGINX_VHOSTSTATS='n'
    
    NGINX_GEOIP='n'
    NGINX_GEOIPMEM='n'
    
    NGINX_LIBATOMIC='n'
    
    NGINX_HTTPREDIS='n'
    
    NGINX_OPENRESTY='n'
    
    NGINX_UPSTREAMCHECK='n'
    
    NGINXBACKUP='n'
    
    PHPREDIS='n'
    PHPFINFO=y
    

    I am using Xenforo & setting up the Resource Manager to handle community file uploads on my site. There are a few files which are quite large (~2gb) & I would like to accomodate them.

    Uploading large files return a 413 error & after many guess-&-check tests I have identified my limit as 100MB, anything over returns 413.

    Searching points to a wealth of results on client_max_body_size not being set, but I have this set correctly (I believe).

    I have client_max_body_size (2G & 2500M both tried) set in my .conf file in location & server & receive the 413 error still.

    I also tested client_max_body_size 20M & 50M & both functioned as expected, files uploaded under the 20/50 mb succeeded & over failed. For this reason I feel there is some other limit or wall I'm running into.

    Please advise wise community :)
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,634
    6,862
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,308
    Local Time:
    1:36 PM
    Nginx 1.13.x
    MariaDB 5.5
    which .conf ? that setting is edited at /usr/local/nginx/conf/nginx.conf
     
  3. Ethic

    Ethic New Member

    6
    3
    3
    Aug 30, 2017
    Ratings:
    +3
    Local Time:
    10:36 PM
    /usr/local/nginx/conf/conf.d/sitename.conf

    Included from the /usr/local/nginx/conf/nginx.conf file:
    Code:
    include /usr/local/nginx/conf/conf.d/*.conf;
     
  4. eva2000

    eva2000 Administrator Staff Member

    30,634
    6,862
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,308
    Local Time:
    1:36 PM
    Nginx 1.13.x
    MariaDB 5.5
    try setting it in /usr/local/nginx/conf/nginx.conf and restart nginx and php and see

    also are you behind cloudflare proxy ? they have an upload limit at their nginx edge servers too 100MB IIRC for free plan & pro plans and 200MB for Business and 500+ for Enterprise plan.

    upload_2017-8-30_9-23-17.png
     
    Last edited: Aug 30, 2017
    • Winner Winner x 1
  5. Ethic

    Ethic New Member

    6
    3
    3
    Aug 30, 2017
    Ratings:
    +3
    Local Time:
    10:36 PM
    We use CloudFlare, this has to be it! I tried setting an exclusion on CloudFlare but must have done it wrong. Will check what I set.
     
    • Like Like x 1