当前位置:网站首页>记一次ES 事故
记一次ES 事故
2022-06-11 04:11:00 【bohu83】
从报警来看,业务报接口超时,同时es 错误日志也会提示:
Caused by: org.elasticsearch.common.util.concurrent.EsRejectedExecutionException: rejected execution of [email protected] on EsThreadPoolExecutor[search, queue capacity
= 1000, [email protected]159058[Running, pool size = 49, active threads = 49, queued tasks = 1000, completed tasks = 23765969104]]
at org.elasticsearch.common.util.concurrent.EsAbortPolicy.rejectedExecution(EsAbortPolicy.java:50) ~[elasticsearch-5.2.2.jar:5.2.2]
at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:823) ~[?:1.8.0_71]
at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1369) ~[?:1.8.0_71]
at org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor.doExecute(EsThreadPoolExecutor.java:94) ~[elasticsearch-5.2.2.jar:5.2.2]
at org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor.execute(EsThreadPoolExecutor.java:89) ~[elasticsearch-5.2.2.jar:5.2.2]
at org.elasticsearch.transport.TcpTransport.handleRequest(TcpTransport.java:1445) [elasticsearch-5.2.2.jar:5.2.2]
at org.elasticsearch.transport.TcpTransport.messageReceived(TcpTransport.java:1329) [elasticsearch-5.2.2.jar:5.2.2]
at org.elasticsearch.transport.netty4.Netty4MessageChannelHandler.channelRead(Netty4MessageChannelHandler.java:74) [transport-netty4-5.2.2.jar:5.2.2]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293) [netty-codec-4.1.7.Final.jar:4.1.7.Final]
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:280) [netty-codec-4.1.7.Final.jar:4.1.7.Final]
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:396) [netty-codec-4.1.7.Final.jar:4.1.7.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:248) [netty-codec-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363) ~[netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349) ~[netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341) ~[netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86) ~[netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:642) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:527) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:481) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:441) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [netty-common-4.1.7.Final.jar:4.1.7.Final]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_71]常规操作:
重启es,es 客户端服务,没坚持多久有开始报错。
显示集群负载高,70%,通常在10%以下,状态为red, 意味部分主分片不可用。
紧急选择降级操作,排除历史数据几百G的大分片后恢复。
es 5.2 ,client 是TransportClient ,类似单例模式,排除是client 配置引发的问题
反思:
还是没确认系统负载高对应业务的具体索引,以及具体查询语句。对于底层掌握不够。
补充知识点:
1 为啥不能随意调整es的线程池参数
在并发查询量大的情况下,访问流量超过了集群中单个Elasticsearch实例的处理能力,Elasticsearch服务端会触发保护性的机制,这个跟硬件配置cpu的核数有关,调成几百估计系统就崩溃了。
核心关注:
索引(index):主要是索引数据和删除数据操作
搜索(search):主要是获取,统计和搜索操作
批量操作(bulk):主要是对索引的批量操作
更新(refresh):主要是更新操作
官网介绍如下:
A node uses several thread pools to manage memory consumption. Queues associated with many of the thread pools enable pending requests to be held instead of discarded.
There are several thread pools, but the important ones include:
genericFor generic operations (for example, background node discovery). Thread pool type is
scaling.
searchFor count/search/suggest operations. Thread pool type is
fixedwith a size ofint((# of allocated processors* 3) / 2) + 1, and queue_size of1000.
search_throttledFor count/search/suggest/get operations on
search_throttled indices. Thread pool type isfixedwith a size of1, and queue_size of100.
search_coordinationFor lightweight search-related coordination operations. Thread pool type is
fixedwith a size of a max ofmin(5, (# of allocated processors) / 2), and queue_size of1000.
getFor get operations. Thread pool type is
fixedwith a size of # of allocated processors, queue_size of1000.
analyzeFor analyze requests. Thread pool type is
fixedwith a size of1, queue size of16.
writeFor single-document index/delete/update and bulk requests. Thread pool type is
fixedwith a size of # of allocated processors, queue_size of10000. The maximum size for this pool is1 +# of allocated processors.
snapshotFor snapshot/restore operations. Thread pool type is
scalingwith a keep-alive of5mand a max ofmin(5, (# of allocated processors) / 2).
snapshot_metaFor snapshot repository metadata read operations. Thread pool type is
scalingwith a keep-alive of5mand a max ofmin(50, (# of allocated processors* 3)).
warmerFor segment warm-up operations. Thread pool type is
scalingwith a keep-alive of5mand a max ofmin(5, (# of allocated processors) / 2).
refreshFor refresh operations. Thread pool type is
scalingwith a keep-alive of5mand a max ofmin(10, (# of allocated processors) / 2).
fetch_shard_startedFor listing shard states. Thread pool type is
scalingwith keep-alive of5mand a default maximum size of2 *# of allocated processors.
fetch_shard_storeFor listing shard stores. Thread pool type is
scalingwith keep-alive of5mand a default maximum size of2 *# of allocated processors.
flushFor flush and translog
fsyncoperations. Thread pool type isscalingwith a keep-alive of5mand a default maximum size ofmin(5, (# of allocated processors) / 2).
force_mergeFor force merge operations. Thread pool type is
fixedwith a size of 1 and an unbounded queue size.
managementFor cluster management. Thread pool type is
scalingwith a keep-alive of5mand a default maximum size of5.
system_readFor read operations on system indices. Thread pool type is
fixedwith a default maximum size ofmin(5, (# of allocated processors) / 2).
system_writeFor write operations on system indices. Thread pool type is
fixedwith a default maximum size ofmin(5, (# of allocated processors) / 2).
system_critical_readFor critical read operations on system indices. Thread pool type is
fixedwith a default maximum size ofmin(5, (# of allocated processors) / 2).
system_critical_writeFor critical write operations on system indices. Thread pool type is
fixedwith a default maximum size ofmin(5, (# of allocated processors) / 2).
watcherFor watch executions. Thread pool type is
fixedwith a default maximum size ofmin(5 * (# of allocated processors), 50)and queue_size of1000.
边栏推荐
- D structure as index of multidimensional array
- clickjacking漏洞的挖掘与利用
- SSLStrip 终极版 —— location 劫持
- SQL注入关联分析
- Eth Of Erc20 And Erc721
- 超简单 CameraX 人脸识别效果封装
- Statistical knowledge required by data analysts
- Vulkan-官方示例解读-Shadows(光栅化)
- Embedded basic interface-i2c
- How to check whether domain name resolution is effective?
猜你喜欢

ETH 中继接口

Cloud broadcast alert, guanghetong helps intelligent camera to build a "river protection" drowning prevention system

七个好用的装饰器

Google 有哪些牛逼的开源项目?

Guanghetong won the "science and Technology Collaboration Award" of Hello travel, driving two rounds of green industries to embrace digital intelligence transformation

直播助力杭州电商独角兽冲击上市,分账系统重构电商交易新格局

6. form label

未来已来,5G-Advanced时代开启

Watson K's Secret Diary

Vulkan-官方示例解读-RayTracing
随机推荐
The future has come and the 5g advanced era has begun
B - 刷墙 (C语言)
Evil CSRF
ESP series module burning firmware
【网络篇】套接字编程
June 10, 2022: Captain Shu crosses a sweet potato field from north to South (m long from north to South and N wide from east to West). The sweet potato field is divided into 1x1 squares. He can start
Market prospect analysis and Research Report of electronic pelletizing counter in 2022
密码找回功能可能存在的问题(补充)
你知道MallBook分账与银行分账的区别吗?
[server data recovery] data recovery case of RAID5 crash of buddy storage
d结构用作多维数组的索引
Analysis of zero time technology | discover lightning loan attack
Market prospect analysis and Research Report of modular lithium ion battery in 2022
Final review of software engineering notes (short answer)
[激光器原理与应用-2]:国内激光器重点品牌
Market prospect analysis and Research Report of pipe and hose press fitting tools in 2022
Market prospect analysis and Research Report of hydrogen liquefier in 2022
golang泛型:generics
This artifact is highly recommended. One line command will convert the web page to PDF!
Some differences between people