Reconnection after connection lost
See original GitHub issueHi, congratulations for this module, I use it in production on my platform.
I use pm2 as a process manager.
Sometimes I get the following error:
{ Error: Connection lost: The server closed the connection.
at Protocol.end (/home/imroot/node_modules/mysql/lib/protocol/Protocol.js:112:13)
at Socket.<anonymous> (/home/imroot/node_modules/mysql/lib/Connection.js:94:28)
at Socket.<anonymous> (/home/imroot/node_modules/mysql/lib/Connection.js:526:10)
at Socket.emit (events.js:203:15)
at endReadableNT (_stream_readable.js:1145:12)
at process._tickCallback (internal/process/next_tick.js:63:19) fatal: true, code: 'PROTOCOL_CONNECTION_LOST' }
I think it’s because my app occasionally disconnects from the database.
I found this and much more, but I’m not sure how to adapt it to your model with this different syntax, could you help me out? it could be useful for many.
Thanks
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
the connection has been lost. attempting to reconnect to your ...
I have a brand new Windows 2008 R2 server with Remote Desktop Services installed. My old server was a Windows 2003 server running...
Read more >No reconnection after connection lost · Issue #431 - GitHub
I try to reconnect after connection lost like there and it doen's works https://github.com/felixge/node-mysql#server-disconnects.
Read more >ESP32 Reconnect to Wi-Fi After Lost Connection network
This quick guide shows how you can reconnect your ESP32 to a Wi-Fi network after losing the connection. This can be useful in...
Read more >reconnection after connection lost fails . - Google Groups
When the connection to the server gets lost (i.e routerseset, dsl reconnection,), and I try to reconnect with the same ffmpeg cmdline, nginx'...
Read more >Blynk Reconnect when wifi connection is lost
Hello,. I made a simple Blynk program, but the connection to my internet is not great. sometimes he is losing connection, but it...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I use dynamodb to pick up from the last known rowid / timestamp that’s been processed. https://gist.github.com/8secz-johndpope/4bf52a0d40071bfa75bfea35aea7f5b9 On reconnect - I just flash forward through transactions…
does anyone has found a way to keep connected ? I have a problem that the connection can break on the middle of a processing that is activated by a insert trigger.