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

"Topology was destroyed" error after returning from sleep #98

Open
josebolos opened this issue Sep 20, 2019 · 0 comments
Open

"Topology was destroyed" error after returning from sleep #98

josebolos opened this issue Sep 20, 2019 · 0 comments

Comments

@josebolos
Copy link
Member

Yesterday I was running pa11y-dashboard locally for debugging purposes, put the laptop to sleep with the dashboard still running, and today after I tried to use the dashboard I started getting the following errors:

  1. Topology was destroyed: When trying, for example, to edit the details of a task (http://localhost:4000/5d33aae9c193490149107fa3/edit) the page will render correctly but Topology was destroyed will appear in the logs. Any attempt to access the DB will show this error. The app is unable to connect to the DB at all, which means that is in an unsafe/invalid state.
  2. When in that state, trying to browse some of the pages (e.g. the home page) will generate an HTTP 500 error, but not all of them will.

We should probably catch these errors and make the app either re-attempt to connect to the DB, or bail out and crash, so any process management (e.g. pm2, forever, etc) can re-launch the app.

It may seem unlikely that users ever see this message but there's a chance this could happen if a running instance gets temporarily suspended (doesn't Heroku do something like this?) but, regardless, because it's good behaviour to catch these errors and try to recover or exit cleanly instead of being stuck in a permanent "HTTP 500" state.

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

No branches or pull requests

1 participant