[英]sails js Error: Handshake inactivity timeout
I am saving quite some data into the database and I kept on getting this error我正在将相当多的数据保存到数据库中,并且不断收到此错误
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 }
I have looked through posts and quite few places mentioned increase the connection limit but when I look into the V1 sailsjs about connection limit I do not see much.我浏览了帖子,提到的地方很少会增加连接限制,但是当我查看有关连接限制的 V1 sailsjs 时,我看不到太多。 I see posts that's like 3-4 years ago talking about a file
config/connection.js
which doesn't even exist.我看到类似 3-4 年前的帖子谈论一个甚至不存在的文件
config/connection.js
。
But I still tried adding in the config inside config/datastore.js
to set the pool into false.但我仍然尝试在
config/datastore.js
添加配置以将池设置为 false。 So I have in datastore of所以我在数据存储中
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,
},
But I still get the error though.但我仍然收到错误。 Does anyone have idea what I should do about this?
有谁知道我应该怎么做?
Thanks in advance for any help.在此先感谢您的帮助。
Apparently this is a connection issue.显然这是一个连接问题。 Check it out to grant the connection is fine using some MySQL client like MySQL WorkBench .
使用某些 MySQL 客户端(如MySQL WorkBench )检查它以授予连接是否正常。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.