Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SQL connection error #10

Open
shivamshekhar opened this issue Apr 10, 2021 · 0 comments
Open

Fix SQL connection error #10

shivamshekhar opened this issue Apr 10, 2021 · 0 comments

Comments

@shivamshekhar
Copy link
Owner

Server shut down abruptly due to following sql connection error.

9 Apr 14:52:43 - Database is successfully connected
9 Apr 14:52:43 - Chat app listening at 3000
events.js:291
      throw er; // Unhandled 'error' event
      ^

Error: Connection lost: The server closed the connection.
    at Protocol.end (/home/ubuntu/server/chat-app-backend/node_modules/mysql/lib/protocol/Protocol.js:112:13)
    at Socket.<anonymous> (/home/ubuntu/server/chat-app-backend/node_modules/mysql/lib/Connection.js:94:28)
    at Socket.<anonymous> (/home/ubuntu/server/chat-app-backend/node_modules/mysql/lib/Connection.js:526:10)
    at Socket.emit (events.js:326:22)
    at endReadableNT (_stream_readable.js:1241:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on Connection instance at:
    at Connection._handleProtocolError (/home/ubuntu/server/chat-app-backend/node_modules/mysql/lib/Connection.js:423:8)
    at Protocol.emit (events.js:314:20)
    at Protocol._delegateError (/home/ubuntu/server/chat-app-backend/node_modules/mysql/lib/protocol/Protocol.js:398:10)
    at Protocol.end (/home/ubuntu/server/chat-app-backend/node_modules/mysql/lib/protocol/Protocol.js:116:8)
    at Socket.<anonymous> (/home/ubuntu/server/chat-app-backend/node_modules/mysql/lib/Connection.js:94:28)
    [... lines matching original stack trace ...]
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  fatal: true,
  code: 'PROTOCOL_CONNECTION_LOST'
}

Potential Fix : https://stackoverflow.com/questions/20210522/nodejs-mysql-error-connection-lost-the-server-closed-the-connection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant