doulun7739 2016-10-19 19:11
浏览 178
已采纳

nginx 413请求实体太大(客户端意图发送太大的身体)

I know that this question has been asked multiple times but I have tried all of them and updated client_max_body_size to 0 and to even 16400M but it didn't help. I did asked my hosting support to restart the nginx and php fpm service too.

My server configuration is:

2GB RAM, Plesk server version : Plesk 12.5.30 Wordpress version : 4.6.1 PHP versoin : 7.0.12 set to run php at fastCGI application served by apache

The website is in wordpress and I can't even upload a file larger then 100mb from wordpress media uploader or through any other form.

From media uploader it gives this error in the ajax post request : POST https://transcriptionpanda.com/wp-admin/async-upload.php

In my server logs I see this nginx error : 15271#0: *307 client intended to send too large body: 710634025 bytes

My /etc/nginx/nginx.conf code is :

#user  nginx;
worker_processes  1;

#error_log  /var/log/nginx/error.log;
#error_log  /var/log/nginx/error.log  notice;
#error_log  /var/log/nginx/error.log  info;

#pid        /var/run/nginx.pid;

include /etc/nginx/modules.conf.d/*.conf;

events {
    worker_connections  1024;
}


http {
client_max_body_size 0;
client_header_buffer_size 4k;
large_client_header_buffers  4 4k;
client_body_buffer_size  256k;
    include       mime.types;
    default_type  application/octet-stream;

    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;
    #tcp_nodelay        on;

    #gzip  on;
    #gzip_disable "MSIE [1-6]\.(?!.*SV1)";

    server_tokens off;

    include /etc/nginx/conf.d/*.conf;
}

# override global parameters e.g. worker_rlimit_nofile
include /etc/nginx/*global_params;

I am really hopeless now and not sure what to do. Smaller file uploads fine(100MB or so). Files larger then 100MB fails to upload.

Any help would be appreciated.

Update: Here is a link of phpinfo of website server: https://transcriptionpanda.com/phpinfo.php

  • 写回答

1条回答 默认 最新

  • douqianbiao4216 2016-10-20 02:01
    关注

    Please check the following configurations -

    Nginx

    client_max_body_size
    

    PHP

    post_max_size
    upload_max_filesize
    

    And restart.

    Source:

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 求京东批量付款能替代天诚
  • ¥15 slaris 系统断电后,重新开机后一直自动重启
  • ¥15 51寻迹小车定点寻迹
  • ¥15 谁能帮我看看这拒稿理由啥意思啊阿啊
  • ¥15 关于vue2中methods使用call修改this指向的问题
  • ¥15 idea自动补全键位冲突
  • ¥15 请教一下写代码,代码好难
  • ¥15 iis10中如何阻止别人网站重定向到我的网站
  • ¥15 滑块验证码移动速度不一致问题
  • ¥15 Utunbu中vscode下cern root工作台中写的程序root的头文件无法包含