我有这个查询,它似乎间歇性地超时
@Given("^board$")
public void board(List<Board> board) throws Throwable {
// process however you want
}
这有什么问题吗?当我在MySQL工作台上尝试此查询时,似乎一切正常。但是在Sequelize上,它似乎导致:
SELECT l.date, p.type
FROM (SELECT "2019-01-22T20:45:00" AS date UNION SELECT "2019-01-29T07:15:00" AS date) l
INNER JOIN pinfare_peak p
ON l.date BETWEEN p.start AND p.end;
在RDS错误日志中,我确实看到了类似的东西:
TimeoutError: ResourceRequest timed out
at ResourceRequest._fireTimeout (/var/task/node_modules/generic-pool/lib/ResourceRequest.js:62:17)
at Timeout.bound (/var/task/node_modules/generic-pool/lib/ResourceRequest.js:8:15)
at ontimeout (timers.js:482:11)
at tryOnTimeout (timers.js:317:5)
at Timer.listOnTimeout (timers.js:277:5)
但是我不确定它们是否相关
我的代码如下:
Aborted connection 10 to db: 'income' user: 'income' host: '10.0.13.26' (Got an error reading communication packets)
数据库选择失败。当我在同一数据库上使用在MySQL工作台上生成的同一选择查询时,它可以正常工作。而且实际上并不慢。为什么会导致Node超时?