question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crash when database connection is lost

See original GitHub issue

We had the issue, that etherpad shuts down, when the database connection was lost (for example due to a database server restart).

Etherpad version: 1.3.0 Node version: 0.8.26 (There were some issues with newer versions)

Reproduce: Use etherpad with mysql/postgresql shutdown database

Log with postgresql:

[2014-03-03 15:39:57.699] [ERROR] console - error: terminating connection due to administrator command
    at Connection.parseE (/Users/timowelde/Documents/workspaces/etherpad/etherpad-lite/src/node_modules/ueberDB/node_modules/pg/lib/connection.js:508:11)
    at Connection.parseMessage (/Users/timowelde/Documents/workspaces/etherpad/etherpad-lite/src/node_modules/ueberDB/node_modules/pg/lib/connection.js:368:17)
    at Socket.Connection.attachListeners (/Users/timowelde/Documents/workspaces/etherpad/etherpad-lite/src/node_modules/ueberDB/node_modules/pg/lib/connection.js:84:20)
    at Socket.EventEmitter.emit (events.js:96:17)
    at TCP.onread (net.js:397:14)
[2014-03-03 15:39:57.699] [INFO] console - graceful shutdown...
[2014-03-03 15:39:57.699] [INFO] console - db sucessfully closed.

Log with mysql:

[2014-03-03 15:37:19.249] [ERROR] console - Error: connect ECONNREFUSED
    at errnoException (net.js:770:11)
    at Object.afterConnect [as oncomplete] (net.js:761:19)
[2014-03-03 15:37:19.249] [INFO] console - graceful shutdown...
[2014-03-03 15:37:19.274] [INFO] console - db sucessfully closed.

Edit: added steps to reproduce, detailed log for postgres, added log for mysql, used code blocks, accidentally closed the issue

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
JohnMcLearcommented, May 6, 2020

Closing as 99% of the time system scripts are handling this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Do not crash when DB connection lost - Sparx Systems
When the DB connection closes, for instance because of a timeout (I went to lunch), EA crashes and dies. It would be really...
Read more >
Troubleshooting database outages and connection issues
Learn about the possible reasons your database might be down or not connected and what you can do to fix it.
Read more >
How to Fix the Error Establishing a Database Connection in ...
1. Check Your WordPress Database Credentials. The most common reason for database connection error in WordPress is incorrect database ...
Read more >
Connect for ODBC SQL Server driver crashes the application ...
A crash occurs in the application when attempting to call SQLExecDirect on a broken connection. When driver writes to closed socket a SIGPIPE ......
Read more >
App crash on connection loss even when using pool
My app is crashing regularly with this error: Error: Connection lost: The server closed the connection.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found