Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 服务实例并发请求数量过大 #2219

Open
1 of 3 tasks
ping15 opened this issue May 10, 2024 · 3 comments
Open
1 of 3 tasks

fix: 服务实例并发请求数量过大 #2219

ping15 opened this issue May 10, 2024 · 3 comments
Assignees
Labels
for test 可以在测试环境进行验收

Comments

@ping15
Copy link
Collaborator

ping15 commented May 10, 2024

问题描述

简明扼要地描述bug是什么

截屏

请提供截屏来解释你的问题,当然这也能更好地帮助我们理解问题。

请提供以下信息

  • bk-nodeman 版本 (发布版本号 或 git
    tag):
  • 蓝鲸PaaS 版本:
  • bk-nodeman 异常日志:

重现方法

列出如何重现的方法或操作步骤

  1. 转到 '....'
  2. 点击 '....'
  3. 错误现象 '....'

修复

建议的修复方案

修复方案

功能自测

代码变更覆盖功能点需要自测并截图

功能点 1

描述代码变更涉及功能点及自测截图

功能点 2

描述代码变更涉及功能点及自测截图

...

@ping15 ping15 added kind/bug 缺陷 backlog 需求初始状态,等待产品进行评估 labels May 10, 2024
@ZhuoZhuoCrayon
Copy link
Member

@ping15 没有定位到原因前 issue 名称写的宽泛一点:服务实例并发请求数量过大

@ping15 ping15 changed the title fix: 修复模块id数量小于15时并发请求服务实例导致超频问题 fix: 修复batch_request多请求一次实例导致超频问题 May 10, 2024
@ping15 ping15 added doing 已经接受处理,正在开发实验 and removed kind/bug 缺陷 backlog 需求初始状态,等待产品进行评估 labels May 10, 2024
@ping15 ping15 changed the title fix: 修复batch_request多请求一次实例导致超频问题 fix: 服务实例并发请求数量过大 May 10, 2024
@ZhuoZhuoCrayon
Copy link
Member

ZhuoZhuoCrayon commented May 10, 2024

  1. limit 统一改成 1000,由于 limit * 2,interval 调整为 0.2
  2. tools 新增 get_instances_by_scope_with_checker 方法,可传入 steps: models.SubscriptionStep,get_instances_by_scope_with_checker 会调用 get_instances_by_scope
  3. 2.step.params 进行检查,如果不存在 cmdb_instance.process,则不需要调用 add_process_info_to_instances
  4. get_instances_by_scope_with_checkerscope 注入 with_info,如果 "process" 信息需要,设置为 with_info: {"process": true}with_info 用于 get_instances_by_scope 判断是否需要调用 add_process_info_to_instances
  5. 代码引用到 get_instances_by_scope 的地方,都改成 get_instances_by_scope_with_checker

@ping15 如何判断 params 是否存在 cmdb_instance.process?把 params 先用 json.dump 转为字符串

image

目前已有的配置模板里,没有用到 process

image

@ping15
Copy link
Collaborator Author

ping15 commented May 11, 2024

全部数据(8379)

"list_service_instance_detail"
image

带bk_host_list(5917)

"list_service_instance_detail" AND "bk_host_list"
image
image

带service_instance_ids(7)

"list_service_instance_detail" AND "service_instance_ids"
image
image

带bk_module_id(1342)

"list_service_instance_detail" NOT "service_instance_ids" NOT "bk_host_list" AND "'with_name': true, 'bk_module_id'"
image
image

啥都不带(911)

"list_service_instance_detail" NOT "service_instance_ids" NOT "bk_host_list" NOT "'with_name': true, 'bk_module_id'"
image
image

@ping15 ping15 self-assigned this May 14, 2024
@ping15 ping15 added for test 可以在测试环境进行验收 and removed doing 已经接受处理,正在开发实验 labels May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for test 可以在测试环境进行验收
Projects
None yet
Development

No branches or pull requests

2 participants