有没有办法阻止此错误"select * from " client_api_key " where " api_key " = $1 limit $2 - Connection terminated



我使用adonis.js,我有以下查询。。。当我向API发出请求时,这是第一个数据库查询。我每小时左右只收到一次以上错误。我使用render.com来托管我的API和postgres数据库。我相信adonis.js使用knex,这可能是问题所在,但我不确定。

const api_key_check = await database
.table('client_api_key')
.where('api_key', api_key_encoded)
.first()

自node的12发布以来,knex似乎有一个悬而未决的问题。按照这个线程,看看一些建议的解决方案是否适合你:

https://github.com/knex/knex/issues/3523#issuecomment-722574083

最新更新