Neo4j ERROR: Detected VM stop-the-world pause: {pauseTime=111, gcTime=0, gcCount=0}

Neo4j ERROR: Detected VM stop-the-world pause: {pauseTime=111, gcTime=0, gcCount=0}
  • 问题: 服务访问慢,neo4j执行cql查询语句慢,neo4j日志报错警告: Detected VM stop-the-world pause.

  • 原因: 服务端存在单条CQL语句对大量节点node执行修改的语句;单条CQL操作数据量大(2M),执行耗时长(4h).

  • 解决: 优化改慢修改慢查询CQL,改为批量修改等方式.

Neo4j 日志

debug.log

debug.log
2022-10-10 11:24:58.437+0800 WARN [o.n.k.i.c.VmPauseMonitorComponent] Detected VM stop-the-world pause: {pauseTime=140, gcTime=142, gcCount=1}
2022-10-10 11:24:58.604+0800 WARN [o.n.k.i.c.VmPauseMonitorComponent] Detected VM stop-the-world pause: {pauseTime=111, gcTime=0, gcCount=0}

2022-10-10 14:07:34.373+0800 ERROR [o.n.b.t.p.HouseKeeper] Fatal error occurred when handling a client connection: [id: 0x78a8bd5a, L:/10.xx.xx.xx:7687 - R:/172.xx.xx.xx:29211] readAddress(..) failed: 连接超时
io.netty.channel.unix.Errors$NativeIoException: readAddress(..) failed: 连接超时
2022-10-10 14:07:34.885+0800 ERROR [o.n.b.t.p.HouseKeeper] Fatal error occurred when handling a client connection: [id: 0x8d788346, L:/10.xx.xx.xx:7687 - R:/172.xx.xx.xx:37176] readAddress(..) failed: 连接超时
io.netty.channel.unix.Errors$NativeIoException: readAddress(..) failed: 连接超时
Spring Server日志

spring.log

2022-10-09 23:44:32.983 INFO  -- [uanRes-thread-pool-0] uan.clear.schedule.SchduleTask        startSchedule:  52 :****************start clear naGuan res Schedule********************
2022-10-09 23:59:26.951 DEBUG -- [uanRes-thread-pool-0] ivers.bolt.request.BoltRequest       executeRequest: 174 :Request: MATCH (n:ResLastCollectTime)
MATCH (m:ResExtendProps)  
where n.id = m.id and n.resTypeNum = {type} and n.dcTime < {lastTime} and m.`extProps.MATRIX_ISSUBSCRIBE` ="0" 
set n.isNeedDel = true
RETURN n.id with params {0=MOD_NET_INTERFACE, lastTime=1663984220001, 1=1663984220001, type=MOD_NET_INTERFACE}
    
		执行CQL耗时 4h 29s
2022-10-10 04:28:44.454 INFO  -- [uanRes-thread-pool-0] aguan.clear.ResNaGuanClearImpl     cleanResByTypeId: 153 :current resIds need autoClean,typeId is :MOD_NET_INTERFACE,resIds size is :2653796
2022-10-10 04:31:20.578 INFO  -- [uanRes-thread-pool-0] uan.clear.schedule.SchduleTask        startSchedule:  84 :****************end clear naGuan res Schedule********************
慢CQL语句
MATCH (n:ResLastCollectTime)
MATCH (m:ResExtendProps)  
where n.id = m.id and n.resTypeNum = 'MOD_NET_INTERFACE' and n.dcTime < 1663984220001 and m.`extProps.MATRIX_ISSUBSCRIBE` ="0" AND n.isNeedDel <> true
set n.isNeedDel = true
RETURN n.id
EXPLAIN
EXPLAIN
MATCH (n:ResLastCollectTime)
MATCH (m:ResExtendProps)  
where n.id = m.id and n.resTypeNum = 'MOD_NET_INTERFACE' and n.dcTime < 1663984220001 and m.`extProps.MATRIX_ISSUBSCRIBE` ="0" AND n.isNeedDel <> true
set n.isNeedDel = true
RETURN n.id

plan

PROFILE
PROFILE
MATCH (n:ResLastCollectTime)
MATCH (m:ResExtendProps)  
where n.id = m.id and n.resTypeNum = 'MOD_NET_INTERFACE' and n.dcTime < 1663984220001 and m.`extProps.MATRIX_ISSUBSCRIBE` ="0" 
// set n.isNeedDel = true
RETURN n.id

plan (1)

参考

Fatal error occurred when handling a client connection causes crash

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值