Wordpress 3.5.1 "client intended to send too large body"

Discussion in 'General' started by mhpcomputerservices, May 20, 2013.

  1. mhpcomputerservices

    mhpcomputerservices Member HowtoForge Supporter

    I've migrated a Wordpress 5.3.1 site ....


    Debian 6.0
    Apache 2.2.16
    php 5.3.24 (fast-cgi)


    Nginx 1.4.1
    php 5.3.10 (php-fpm)

    All was working fine on the original server. However, on the new server when attempting to upload an image we see a wordpress 'HTTP error'.

    Examining the Nginx logs shows:-
    2013/05/20 17:04:25 [error] 5219#0: *84543 client intended to send too large body: 1438769 bytes, client: *EDITED*, server: *EDITED*.co.uk, request: "POST /wp-admin/async-upload.php HTTP/1.1", host: "www.*EDITED*.co.uk", referrer: "http://www.*EDITED*.co.uk/wp-admin/media-new.php"
    This is driving me nuts! I've changed client_max_body_size to 200M and it has no effect :confused:

    root@i7:/etc/nginx# grep -R 'client_max_body_size' *
    nginx.conf:        client_max_body_size 200M;
    sites-available/apps.vhost:        client_max_body_size 200M;
    sites-available/ispconfig.vhost:        client_max_body_size 200M;
    sites-enabled/000-ispconfig.vhost:        client_max_body_size 200M;
    sites-enabled/000-apps.vhost:        client_max_body_size 200M;
    php.ini has also been altered to suit:
    upload_max_filesize = 200M
    post_max_size = 200M
    Ispconfig Nginx Directives
     location = /favicon.ico {
                    log_not_found off;
                    access_log off;
            location = /robots.txt {
                    allow all;
                    log_not_found off;
                    access_log off;
            location / {
                    # This is cool because no php is touched for static content. 
                    # include the "?$args" part so non-default permalinks doesn't break when using query string
                    try_files $uri $uri/ /index.php?$args;
            location ~ \.php$ {
                    #NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
                    include fastcgi.conf;
                    fastcgi_intercept_errors on;
                    fastcgi_pass php;
            location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
                    expires max;
                    log_not_found off;
    Ispconfig Custom php.ini settings
    cgi.fix_pathinfo = 0;
    Can anyone offer any advise here?

  2. mhpcomputerservices

    mhpcomputerservices Member HowtoForge Supporter

  3. jaypabs

    jaypabs Member

    I'm having the same problem also. Did you fix yours?

    I'm also using php5-fpm, nginx.
  4. falko

    falko Super Moderator ISPConfig Developer

    Can you add

    client_max_body_size to 200M;
    to the nginx Directives field?

Share This Page