cube.js TimeoutError: ResourceRequest timed out 问题参考解决方法

查看最近官方提交了一个pr进行了此问题的修复(这个问题官方提交了两个pr)

参考pr

https://github.com/cube-js/cube.js/pull/2576
https://github.com/cube-js/cube.js/pull/2575

核心解决说明

主要是2576 这个pr,核心代码(主要是一个异常处理)

 
 async reconcileQueue() 方法 

具体修改

async reconcileQueue() {
    if (!this.reconcilePromise) {
        this.reconcileAgain = false;
        this.reconcilePromise = this.reconcileQueueImpl().catch((e) => {
            this.reconcilePromise = null;
            throw e;
          }).then(() => {
            this.reconcilePromise = null;
            if (this.reconcileAgain) {
                return this.reconcileQueue();
            }
            return null;
        });
    }
    else {
        this.reconcileAgain = true;
    }
    return this.reconcilePromise;
}

同时官方也进行了一些redis pool 释放的处理参考2575 pr

参考资料

https://github.com/cube-js/cube.js/pull/2576
https://github.com/cube-js/cube.js/pull/2575

原文地址:https://www.cnblogs.com/rongfengliang/p/14679730.html