Sornets
V2EX  ›  PHP

我使用 ueditor 上传视频文件时,传输时间不能超过 30s,一到 30s 左右就传输失败。

  •  
  •   Sornets · Dec 29, 2016 · 3173 views
    This topic created in 3442 days ago, the information mentioned may be changed or developed.
    最近需要使用 ueditor 上传视频文件,但是小视频还好,一旦视频上传的时间超过 30s ,就会提示上传失败。
    chrome 给的错误是 net::ERR_CONNECTION_RESET
    换了别的浏览器也不能上传。

    考虑过是 ueditor 或者 nginx 或者 php 的配置有问题,但是修改了相关配置,如:
    nginx:
    keepalive_timeout:60

    php:
    max_input_time=300
    max_execution_time=300
    post_max_size=300M
    upload_max_filesize=300M
    default_socket_timeout=60

    ueditor:
    没有见到有时间相关的配置项

    请问这是什么原因?
    6 replies    2016-12-30 00:15:44 +08:00
    Sornets
        1
    Sornets  
    OP
       Dec 29, 2016
    配置没有排好版:
    nginx: keepalive_timeout:60

    php: max_input_time=300
    max_execution_time=300
    post_max_size=300M
    upload_max_filesize=300M
    default_socket_timeout=60

    ueditor: 没有见到有时间相关的配置项
    gouchaoer
        2
    gouchaoer  
       Dec 29, 2016 via Android
    lslqtz
        3
    lslqtz  
       Dec 29, 2016
    @gouchaoer set_time_limit=max_execution_time
    lslqtz
        4
    lslqtz  
       Dec 29, 2016
    @Sornets
    ERR_CONNECTION_RESET 感觉是 Nginx 的问题。
    fastcgi_connect_timeout 600; 链接
    fastcgi_read_timeout 600; 读取
    fastcgi_send_timeout 600; 发请求
    网上抄了一段,建议你试试看在内网传文件试试看。
    lslqtz
        5
    lslqtz  
       Dec 29, 2016
    PHP 下也可以使用命令行,不依赖 Nginx 判断问题。
    -S 参数指定监听地址和端口,<addr>:<port>
    -t 参数指定目录
    yylzcom
        6
    yylzcom  
       Dec 30, 2016
    Nginx:
    client_max_body_size 25m;
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4626 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 93c8b4a0 · 45ms · UTC 05:35 · PVG 13:35 · LAX 22:35 · JFK 01:35
    ♥ Do have faith in what you're doing.