NetEase / pomelo

A fast,scalable,distributed game server framework for Node.js.
http://pomelo.netease.com
MIT License
11.87k stars 2.9k forks source link

MySQL connection issue #1185

Open KingStar1001 opened 1 year ago

KingStar1001 commented 1 year ago

I have deployed Pomelo server on AWS EC2 (Ubuntu) instance.

When I run the server, it works correctly. But after several hours later, server crashed with mysql issue.

[2023-04-26 02:01:26.771] [ERROR] console - Caught exception: Error: Packets out of order. Got: 0 Expected: 14 at Parser._tryReadPacketHeader (/var/cw_server/game-server/node_modules/mysql/lib/protocol/Parser.js:470:15) at Parser.write (/var/cw_server/game-server/node_modules/mysql/lib/protocol/Parser.js:33:29) at Protocol.write (/var/cw_server/game-server/node_modules/mysql/lib/protocol/Protocol.js:38:16) at Socket. (/var/cw_server/game-server/node_modules/mysql/lib/Connection.js:88:28) at Socket. (/var/cw_server/game-server/node_modules/mysql/lib/Connection.js:526:10) at Socket.emit (events.js:400:28) at addChunk (internal/streams/readable.js:293:12) at readableAddChunk (internal/streams/readable.js:267:9) at Socket.Readable.push (internal/streams/readable.js:206:10) at TCP.onStreamRead (internal/stream_base_commons.js:188:23)

*Note*: I used the same code as lordofpomelo for MySQL.

So, I created a simple socket server that uses the same database and it works correctly.

MirroZhou commented 1 year ago

谢谢~已收到!

KingStar1001 commented 1 year ago

@MirroZhou What is the status of this issue? Can you resolve my problems?