1

so my friend is letting me use his vps for my bot, i made a remote sql so don't say its because i did not connect my sql, that has happend about 3 times already trying to find a fix for this.

So this is the error code that i get in putty

[2019-09-14 14:21:08]: ERROR Uncaught Exception: Error: Connection lost: The server closed the connection.
at Protocol.end (/home/denty/neko-bot/node_modules/mysql/lib/protocol/Protocol.js:112:13)
at Socket.<anonymous> (/home/denty/neko-bot/node_modules/mysql/lib/Connection.js:97:28)
at Socket.<anonymous> (/home/denty/neko-bot/node_modules/mysql/lib/Connection.js:525:10)
at Socket.emit (events.js:214:15)
at endReadableNT (_stream_readable.js:1178:12)
at processTicksAndRejections (internal/process/task_queues.js:77:11)

so about 30-40 min after i node index i get that error and yea im new to vps so go easy on me

edit: ok so i have did that and it still doesnt work, this is the new error im getting

PROTOCOL_CONNECTION_LOST
db error Error: Connection lost: The server closed the connection.
 at Protocol.end (/home/denty/neko-bot/node_modules/mysql/lib/protocol/Protocol.js:112:13)
 at Socket.<anonymous> (/home/denty/neko-bot/node_modules/mysql/lib/Connection.js:97:28)
 at Socket.<anonymous> (/home/denty/neko-bot/node_modules/mysql/lib/Connection.js:525:10)
 at Socket.emit (events.js:214:15)
 at endReadableNT (_stream_readable.js:1178:12)
 at processTicksAndRejections (internal/process/task_queues.js:77:11) {
fatal: true,
code: 'PROTOCOL_CONNECTION_LOST'
}
[2019-09-14 15:20:51]: ERROR Uncaught Exception: Error: Cannot enqueue Query after fatal error.
 at Protocol._validateEnqueue (/home/denty/neko-bot/node_modules/mysql/lib/protocol/Protocol.js:212:16)
 at Protocol._enqueue (/home/denty/neko-bot/node_modules/mysql/lib/protocol/Protocol.js:138:13)
 at Connection.query (/home/denty/neko-bot/node_modules/mysql/lib/Connection.js:201:25)
 at Client.<anonymous> (/home/denty/neko-bot/index_1.js:186:9)
 at Client.emit (events.js:214:15)
 at MessageCreateHandler.handle (/home/denty/neko-bot/node_modules/discord.js/src/client/websocket/packets/handlers/MessageCreate.js:9:34)
 at WebSocketPacketManager.handle (/home/denty/neko-bot/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:105:65)
 at WebSocketConnection.onPacket (/home/denty/neko-bot/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:333:35)
 at WebSocketConnection.onMessage (/home/denty/neko-bot/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:296:17)
Denty Mods OP
  • 11
  • 1
  • 4
  • 2
    Possible duplicate of [nodejs mysql Error: Connection lost The server closed the connection](https://stackoverflow.com/questions/20210522/nodejs-mysql-error-connection-lost-the-server-closed-the-connection) – Chlod Alejandro Sep 14 '19 at 14:41
  • 1
    We maybe could help you, if you could provide a https://stackoverflow.com/help/minimal-reproducible-example – Sebastian Speitel Sep 14 '19 at 20:43
  • `Cannot enqueue Query after fatal error.` means the script is trying to send a query after a fatal error (the SQL server is disconnected.) When you catch the error that closes the server, you should immediately create a new connection. – Chlod Alejandro Sep 14 '19 at 21:50

0 Answers0