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 树莓派与pix飞控通信
  • ¥15 自动转发微信群信息到另外一个微信群
  • ¥15 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题