我正在将相当多的数据保存到数据库中,并且不断收到这个错误
Error: Handshake inactivity timeout
at Handshake.<anonymous> (/project/node_modules/mysql/lib/protocol/Protocol.js:164:17)
code: 'PROTOCOL_SEQUENCE_TIMEOUT',
fatal: true,
timeout: 10000 }我看过一些帖子,很少有地方提到提高连接限制,但当我查看有关连接限制的V1 sailsjs时,我没有看到太多。我看过像3-4年前的帖子,谈论一个甚至不存在的文件config/connection.js。
但我仍然尝试在config/datastore.js中添加配置,以将池设置为false。所以我在数据存储中有
default: {
/***************************************************************************
* *
* Want to use a different database during development? *
* *
* 1. Choose an adapter: *
* https://sailsjs.com/plugins/databases *
* *
* 2. Install it as a dependency of your Sails app. *
* (For example: npm install sails-mysql --save) *
* *
* 3. Then pass it in, along with a connection URL. *
* (See https://sailsjs.com/config/datastores for help.) *
* *
***************************************************************************/
adapter: 'sails-mysql',
url: 'mysql://user:pass@ip:port/db_name',
pool: false,
},但是我仍然得到了错误。有谁知道我该怎么做吗?
提前感谢您的帮助。
发布于 2020-12-13 13:25:55
显然,这是一个连接问题。使用像MySQL WorkBench这样的MySQL客户端检查连接是否正常。
https://stackoverflow.com/questions/59397734
复制相似问题