鍍金池/ 問答/數(shù)據(jù)庫(kù)  HTML/ PM2 Error: Connection lost: The server

PM2 Error: Connection lost: The server closed the connection

PM2半夜莫名重啟,然后報(bào)下面的錯(cuò)是什么意思?是mysql的原因?

Error: Connection lost: The server closed the connection.
    at Protocol.end (/xxxx/xxx/xxx/node_modules/mysql/lib/protocol/Protocol.js:113:13)
    at Socket.<anonymous> (/xxxx/xxx/xxx/node_modules/mysql/lib/Connection.js:109:28)
    at emitNone (events.js:111:20)
    at Socket.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1056:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickDomainCallback (internal/process/next_tick.js:218:9)
Node.js的版本是v8.9.0.  PM2的版本是2.9.1. mysql庫(kù)的版本是2.15.0。
回答
編輯回答
夢(mèng)一場(chǎng)

感覺像是mysql連不上的原因,你最好自己排查

  1. 用其他工具連mysql,看是否能正確連上mysql服務(wù)
  2. 在mysql服務(wù)所在主機(jī)查看是否連接正常,服務(wù)啟動(dòng)沒有,或者看相應(yīng)日志
2017年11月27日 17:10