Too many dynamic script compilations within, max: [75/5m]问题处理

1.定位问题:

a.字面意思是,ElasticSearch5分钟内执行脚本编译超过75个,编译太多而拒绝编译。编译是非常耗时的,这是ES的自我保护功能。

b.我的操作是动态评分通过script实现去了。

{
    "query": {
        "function_score": {
            "functions": [
                {
                    "script_score": {
                        "script": {
                            "source": "_score * ((doc['scoreWords'].values.contains('大米')) ? 2.0 : 1.0)",
                            "lang": "painless"
                        }
                    }
                }
            ]
        }
    }
}

2.寻求解决办法:一般而言是由两种解决办法,一是调高限制。二是采用filter+权重评分。

a.调高限制,官方操作方法:

PUT _cluster/settings
{
    "transient" : {
        "script.max_compilations_rate" : "100/1m"
    }
}

b.寻找替代方法&#

  • 9
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Failed to compile with 2 errors 20:57:29 [eslint] ESLint is not a constructor You may use special comments to disable some warnings. Use // eslint-disable-next-line to ignore the next line. Use /* eslint-disable */ to ignore all warnings in a file. Error: Child compilation failed: [eslint] ESLint is not a constructor - child-compiler.js:169 [shop]/[html-webpack-plugin]/lib/child-compiler.js:169:18 - Compiler.js:551 finalCallback [shop]/[webpack]/lib/Compiler.js:551:5 - Compiler.js:577 [shop]/[webpack]/lib/Compiler.js:577:11 - Compiler.js:1199 [shop]/[webpack]/lib/Compiler.js:1199:17 - task_queues:95 processTicksAndRejections node:internal/process/task_queues:95:5 - task_queues:64 runNextTicks node:internal/process/task_queues:64:3 - timers:447 process.processImmediate node:internal/timers:447:9 ERROR in [eslint] ESLint is not a constructor ERROR in Error: Child compilation failed: [eslint] ESLint is not a constructor - child-compiler.js:169 [shop]/[html-webpack-plugin]/lib/child-compiler.js:169:18 - Compiler.js:551 finalCallback [shop]/[webpack]/lib/Compiler.js:551:5 - Compiler.js:577 [shop]/[webpack]/lib/Compiler.js:577:11 - Compiler.js:1199 [shop]/[webpack]/lib/Compiler.js:1199:17 - task_queues:95 processTicksAndRejections node:internal/process/task_queues:95:5 - task_queues:64 runNextTicks node:internal/process/task_queues:64:3 - timers:447 process.processImmediate node:internal/timers:447:9 1 ERROR in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details) webpack compiled with 3 errors
06-03

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值