为什么 WSO2AM 会一遍又一遍地针对 mb_metadata table 执行计数查询?

Why does WSO2AM execute count query against mb_metadata table over and over again?

我们为 WSO2AM 2.6.0 启用了高级节流。启用此功能并适当创建执行计划后,我们注意到每小时针对 MB_METADATA table.

执行超过 35M select 计数查询

此外,MB_METADATA 和 MB_CONTENT table 不断增长,行数永远不会下降。

我已禁用所有统计信息和跟踪。我们有 4 台 WSO 服务器,每台 运行 独立地与同一个盒子上的网关、密钥管理器和流量管理器连接。数据库是 oracle.

我们看到此查询 运行 3500 万次/小时:

SELECT COUNT(MESSAGE_ID) 作为计数 来自 MB_METADATA 其中 QUEUE_ID=:1 和 MESSAGE_ID 在 :2 和 :3 之间 AND DLC_QUEUE_ID=-1

我希望 table 大小是可管理的,并且此查询不会 运行 达到如此高的速率。

对可能发生的事情有什么建议吗?可能是我需要禁用的配置?

共享 MB 数据库不正确。每个流量管理器节点应该有自己的MB数据库,可以是默认的H2数据库。

引自文档:

Do not share the WSO2_MB_STORE_DB database among the nodes in an Active-Active set-up or Traffic Manager HA scenario, because each node should have its own local WSO2_MB_STORE_DB database to act as separate Traffic Managers.

The latter mentioned DBs can be either H2 DBs or any RDBMS such as MySQL.

If the database gets corrupted then you need to replace the database with a fresh database that is available in the product distribution.

参考:https://docs.wso2.com/display/AM260/Installing+and+Configuring+the+Databases