出现net::ERR_CONTENT_LENGTH_MISMATCH 200 (OK)

sanye

问题描述

webman版本:1.6
服务器:centos7.9
php:8.0
使用webman开发后台接口,加了ssl,但没有强制要求使用https,用nginx按照文档加了代理
前端vue3,本地开发的时候接口总是出现net::ERR_CONTENT_LENGTH_MISMATCH 200 (OK)的错误

截图
打包部署到线上,就不会出现这些错误
也正常加了中间件

145 2 0
2个回答

nitron

https://www.workerman.net/q/10886

最下面那个回答,不知道是否有用

  • sanye 1天前

    这个论坛里面能翻出来的方法已全都测试过,包括百度和必应搜出来的结果,基本上都测试过了,还是没有找到结果

执行 ulimit -n 贴下结果

  • sanye 1天前

    [root@ecs-e968-0426361 eleserver]# ulimit -n
    102400
    [root@ecs-e968-0426361 eleserver]#

  • walkor 1天前

    看下对应的nginx错误日志

  • sanye 1天前

    2025/02/21 02:00:58 [notice] 24832#0: signal process started
    2025/02/21 02:14:08 [notice] 25872#0: signal process started
    2025/02/21 02:14:12 [notice] 25896#0: signal process started
    2025/02/21 02:21:50 [notice] 26590#0: signal process started
    2025/02/21 02:21:51 [notice] 26611#0: signal process started
    2025/02/21 02:21:51 [notice] 26631#0: signal process started
    2025/02/21 02:21:51 [notice] 26650#0: signal process started
    2025/02/21 02:21:52 [notice] 26669#0: signal process started
    2025/02/21 02:22:02 [notice] 26699#0: signal process started
    2025/02/21 02:22:12 [notice] 26726#0: signal process started
    2025/02/21 02:22:14 [notice] 26746#0: signal process started
    2025/02/21 02:27:30 [notice] 27255#0: signal process started
    2025/02/21 02:27:31 [notice] 27279#0: signal process started
    2025/02/21 02:27:31 [notice] 27298#0: signal process started
    2025/02/21 02:27:32 [notice] 27318#0: signal process started
    2025/02/21 02:27:32 [notice] 27337#0: signal process started
    2025/02/21 02:27:32 [notice] 27356#0: signal process started
    2025/02/21 02:27:56 [notice] 27419#0: signal process started
    2025/02/21 02:31:57 [emerg] 27846#0: "proxy_buffer_size" directive is duplicate in /www/server/nginx/conf/nginx.conf:39
    2025/02/21 02:32:08 [emerg] 27881#0: "proxy_buffers" directive is duplicate in /www/server/nginx/conf/nginx.conf:39
    2025/02/21 02:32:10 [emerg] 27897#0: "proxy_busy_buffers_size" directive is duplicate in /www/server/nginx/conf/nginx.conf:39
    2025/02/21 02:32:13 [notice] 27912#0: signal process started
    2025/02/21 02:46:03 [notice] 30734#0: signal process started
    2025/02/21 02:46:06 [notice] 30755#0: signal process started
    2025/02/21 02:46:06 [notice] 30774#0: signal process started
    2025/02/21 02:46:33 [emerg] 30817#0: invalid parameter "https2" in /www/server/panel/vhost/nginx/eleapi.fediot.net.conf:8
    2025/02/21 02:46:38 [notice] 30835#0: signal process started
    2025/02/21 02:46:38 [notice] 30854#0: signal process started
    2025/02/21 02:47:10 [notice] 30908#0: signal process started
    2025/02/21 02:51:07 [notice] 31323#0: signal process started
    2025/02/21 02:52:48 [notice] 31509#0: signal process started
    2025/02/21 02:52:51 [notice] 31532#0: signal process started
    2025/02/21 02:52:51 [notice] 31550#0: signal process started
    2025/02/21 03:14:05 [notice] 923#0: signal process started

  • walkor 1天前

    大概率是nginx没启用keepalive导致的。
    https://www.workerman.net/doc/webman/others/nginx-proxy.html
    这里有nginx配置教程,你参考下,主要是那个keepalive要有

  • sanye 1天前

    配置的时候完全按照您的官网文档来设置的,keepalive 10240 这个设置项是有的,设置在upstream xxx里面

  • nitron 1天前

    nginx好像没用https2这个参数

  • sanye 1天前

    那是我在网上搜的方案,说去掉http2,我就试了一下,发现不行,我就加回来,手一抖多打了一个s,发现保存不了我就改回去了,nginx记录下了这个错误。

  • nitron 1天前

    查看一下nginx的error日志,看是不是临时目录权限问题

  • sanye 1天前

    权限直接在项目根目录给了root 777

  • nitron 1天前

    是nginx的临时目录权限,不是项目的权限,开nginx的错误日志然后重启nginx,
    一般你这种吊诡的问题很大原因是因为nginx的指定用户跟命令行运行的用户不一致导致临时目录无法访问而出错

    先开nginx的error日志吧,出错了里面应该有详细的报错信息

  • nitron 1天前

    如果错误日志里有Permission Denied的报错,大概率就是nginx的临时目录权限

×
🔝