Nginx仅提供我的JS文件的前72kbs [英] Nginx only serving first 72kbs of my JS files

查看:65
本文介绍了Nginx仅提供我的JS文件的前72kbs的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Nginx似乎仅加载我的JavaScript文件的前72kbs.我搜索了我所有的Nginx配置文件,但在任何地方都看不到此设置.我添加了

Nginx appears to only be loading the first 72kbs of my javascript files. I've searched all around my nginx config files and cannot see this setting anywhere. I've added things like

location / {
    ...
    proxy_max_temp_file_size 1m;
    ...
}

location / {
    ...
    sendfile on;
    sendfile_max_chunk 1m;

    ...
}

但是我仍然无法覆盖这个奇怪的设置,该设置仅允许加载文件的第一部分.

But still I'm unable to overwrite this weird setting that is only allowing first part of the file to load.

该连接使用nginx proxy_pass将端口80转发到kibanas端口'5601'.我觉得可能存在一个限制通过代理传输文件的设置?只是不确定在哪里找到它.

The connection uses nginx proxy_pass to foward port 80 to kibanas port '5601'. I feel like there could be a setting that limits file transfer over proxy? Just not sure where to find it.

proxypass连接看起来像:

proxypass connection looks like:

server {
    listen 80;

    server_name logs.mydomain.com;

    auth_basic "Restricted Access";
    auth_basic_user_file /etc/nginx/htpasswd.users;

    location / {
        proxy_pass http://localhost:5601;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
}

我的默认nginx设置发布在这里:

And my default nginx settings is posted here:

http://www.heypasteit.com/clip/OEKIR

推荐答案

磁盘空间不足时会出现,NGINX默认为最小安全设置.

Would appear when disk space is low NGINX defaults to minimal safe settings.

当我检查VM的运行状况时,我注意到磁盘驱动器已满. Elasticsearch每天都会在错误日志中记录几个GB的文本.我仍然没有完全确定为什么弹性搜索会泛滥错误日志.

When I checked the VMs health I noticed that the disk drive was full. Elasticsearch was logging a couple of GBs worth of text in to error logs each day. I still Have not fully identified why elastic search is flooding the error logs.

但是我认为过多的磁盘空间使用导致了此错误. Nginx可能会检测到这一点,并切换到最小安全配置,该配置仅允许每个文件提供72kbs的数据.

But I think excessive disk space usage has contributed to this error. Nginx could be detecting this and switching over to minimal safe configuration which would only allow 72kbs of data to be served per file.

一旦我清除了过多的日志,Nginx便开始再次提供完整的JS文件,而无需重启nginx或kibana.

Once I cleared out the excessive logs, Nginx began serving the full JS files again without needing to restart nginx or kibana.

这篇关于Nginx仅提供我的JS文件的前72kbs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆