首页 \ 问答 \ Elasticsearch上的“打开文件太多”(“Too many open files” on Elasticsearch)

Elasticsearch上的“打开文件太多”(“Too many open files” on Elasticsearch)

我有一个集群ES,从2天前我有这个错误:

[2016-03-14 15:08:48,342][WARN ][cluster.action.shard] [node-01] [logstash-2016.03.14][2] received shard failed for [logstash-2016.03.14][2], node[72oHnFiXTVqgXaUYKTAu2Q], [P], s[INITIALIZING], indexUUID [AKybrAEZRXebyRxcmzTqJQ], reason [Failed to start shard, message [IndexShardGatewayRecoveryException[[logstash-2016.03.14][2] failed recovery]; nested: EngineCreationFailureException[[logstash-2016.03.14][2] failed to open reader on writer]; nested: FileSystemException[/var/lib/elasticsearch/elasticsearch/nodes/0/indices/logstash-2016.03.14/2/index/_lg_Lucene410_0.dvm: Too many open files]; ]]

如果我运行curl -XGET 'http://localhost:9200/_nodes?os=true&process=true&pretty=true' | grep "max_file_descriptors" curl -XGET 'http://localhost:9200/_nodes?os=true&process=true&pretty=true' | grep "max_file_descriptors"我有这个输出:

"max_file_descriptors" : 65535,
"max_file_descriptors" : 65535,

到文件/etc/security/limit.conf我已经有:

elasticsearch - nofile 65535
elasticsearch - memlock unlimited

如果我检查索引的状态我有一些索引RED ....因此logstash出错并崩溃所有


i have a cluster ES and from 2 days ago i have this error:

[2016-03-14 15:08:48,342][WARN ][cluster.action.shard] [node-01] [logstash-2016.03.14][2] received shard failed for [logstash-2016.03.14][2], node[72oHnFiXTVqgXaUYKTAu2Q], [P], s[INITIALIZING], indexUUID [AKybrAEZRXebyRxcmzTqJQ], reason [Failed to start shard, message [IndexShardGatewayRecoveryException[[logstash-2016.03.14][2] failed recovery]; nested: EngineCreationFailureException[[logstash-2016.03.14][2] failed to open reader on writer]; nested: FileSystemException[/var/lib/elasticsearch/elasticsearch/nodes/0/indices/logstash-2016.03.14/2/index/_lg_Lucene410_0.dvm: Too many open files]; ]]

If i run curl -XGET 'http://localhost:9200/_nodes?os=true&process=true&pretty=true' | grep "max_file_descriptors" i have this output:

"max_file_descriptors" : 65535,
"max_file_descriptors" : 65535,

To the file /etc/security/limit.conf i already have:

elasticsearch - nofile 65535
elasticsearch - memlock unlimited

If i check the status of index i have some index RED....consequently logstash goes wrong and crashes all


原文:https://stackoverflow.com/questions/35990055
更新时间:2023-08-11 17:08

最满意答案

  1. 垂直或水平绘制并添加0.5(jsfiddle.net/xr5az/2/) - 您将只获得黑白颜色。 (注意我隐藏线的开头和结尾,它会是灰色的...)

    ctx.moveTo(-2,5.5); ctx.lineTo(17,5.5); ctx.stroke();

  2. 当你添加角度时,系统会添加额外的灰色像素,没有它,线看起来会很糟糕。

  3. 如果您只想从黑色获取线条,请在线条起点和终点之间绘制许多单独的像素(如果想要线宽> 1则绘制正方形)。

ps对不起破碎的小提琴链接,系统踢了我的消息,即使代码包括10次......


  1. draw vertically or horizontally and add 0.5 (jsfiddle.net/xr5az/2/) - you will get only black and white colours. (note that i hided line begin and end, it would be grey ...)

    ctx.moveTo(-2, 5.5); ctx.lineTo(17, 5.5); ctx.stroke();

  2. when you add angle, system adds extra grey colors pixels, without it, line would look bad.

  3. if you want to get line only from black color, draw many separate pixels (or squares if you want lineWidth > 1) between line start and end points.

p.s. sorry for broken fiddle link, system kicked my message even with code included like 10 times ...

相关问答

更多
  • 使用2D画布API自定义线条渲染 没有简单的方法来创建你想要的类型的行,而不会牺牲很多质量。 为了获得最佳质量,您需要将线条渲染为一组垂直于线条并沿着线条长度的小条。 为每个部分计算宽度和颜色,然后渲染该条。 以下图片将有助于解释我的意思。 中间的线是定义曲线。 外线显示宽度变化。 标记为A的部分是单条(放大) 您将线划分为相同的小部分,对于线上的每个点,您需要找到线上的位置以及垂直于线上该点的矢量。 然后,您可以找到距离正确距离的点上方和下方的点,以使宽度成为该点的线。 然后以正确的颜色绘制每个条。 问题 ...
  • 垂直或水平绘制并添加0.5(jsfiddle.net/xr5az/2/) - 您将只获得黑白颜色。 (注意我隐藏线的开头和结尾,它会是灰色的...) ctx.moveTo(-2,5.5); ctx.lineTo(17,5.5); ctx.stroke(); 当你添加角度时,系统会添加额外的灰色像素,没有它,线看起来会很糟糕。 如果您只想从黑色获取线条,请在线条起点和终点之间绘制许多单独的像素(如果想要线宽> 1则绘制正方形)。 ps对不起破碎的小提琴链接,系统踢了我的消息,即使代码包括10次...... d ...
  • 我能够找出问题我自己..如果有人将来需要它我发布修复..我做了一个c.moveTo到以前的X,Y值..并且pblm是固定的.. i was able to figure out the issue my self.. I'm posting the fix if anybody needs it in future.. I made a c.moveTo to previous X, Y values.. and the pblm is fixed..
  • 如果要使用一个渐变来绘制多个矩形,则必须使用标准化渐变(== [0,1]中的坐标),然后以标准化方式绘制矩形。 Expl: var grd = ctx.createLinearGradient(0, 0, 1.0, 0); grd.addColorStop(0,"black"); grd.addColorStop(1,"red"); 然后绘制矩形: function drawNormalizedRect(context, x,y,w,h) { context.save(); context.t ...
  • 除了上一个答案,要获得点击像素的颜色,您需要获得鼠标的x和y : var canvas = document.querySelector('#example') var ctx = canvas.getContext('2d'); var gradient = ctx.createLinearGradient(0, 0, 300, -300); gradient.addColorStop(0, 'rgba(179, 63, 19, 1)'); gradient.addColorStop(8 / ...
  • 这是一个函数,它应该完成梯度线绘制 function drawgradientline(x,y,height){ var grd = context.createLinearGradient(x, y, 1, height); grd.addColorStop(0, '#12a6eb'); grd.addColorStop(1, '#ebc711'); context.fillStyle = grd; context.fill(); } Here is ...
  • 你得到这种效果的原因是因为你在鼠标按下时开始一个新的路径,然后在每个鼠标上移动你向路径添加一个新点,然后绘制路径。 这意味着您一次又一次地重绘路径的相同部分,这会将半透明像素加在一起,从而破坏柔软度。 我建议只使用渐变圆作为“画笔”。 这是一个修改过的jsfiddle: http : //jsfiddle.net/yB3Kr/ 对绘制函数进行了主要更改: function draw(x,y,w,r,g,b,a){ var gradient = ctx.createRadialGradient(x, ...
  • 稍微搜索一下,我从Mozilla Development Network找到了这个例子 function draw() { var ctx = document.getElementById('canvas').getContext('2d'); var radgrad = ctx.createRadialGradient(0,0,1,0,0,150); radgrad.addColorStop(0, '#A7D30C'); radgrad.addColorStop(1, ...
  • 是的,您可以重复使用一次创建的CanvasGradient, var ctx = c.getContext("2d"); var grads = []; for(var i=0; i<20; i++){ grads.push(ctx.createLinearGradient(0,0,300,0)); } grads.forEach(function(grad, i){ var a = i * (360 / 20); grad.addColorStop(0, 'hsl(' + a + ...
  • 代码中需要进行一些小的更改。 在选择颜色值时,您使用以下行, var color_select = document.getElementById('selectedColor'); 基本上它将返回HTMLElementObject而不是颜色。 要从html元素获取颜色,您需要检索该元素的值。 使用, var color_select = document.getElementById('selectedColor').value; 对所有三个工具使用此颜色检查。 使用下面粘贴的更新代码。 ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)