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.

Read-only DB messaging

See original GitHub issue

Bug Report

Expected behaviour

A postgres database in read-only mode should pass messages back to the UI properly.

Actual behaviour

After setting read-only mode (http://longwayaround.org.uk/notes/read-only-postgres-database/), the UI just displays [HTTP 500] Internal Server Error: [object Object] on operations. In the web service log we can see messages like ERROR: cannot execute INSERT in a read-only transaction or ERROR: cannot execute UPDATE in a read-only transaction which would be more descriptive.

Environment (Browser or OS and Dockstore version)

DockstoreUI - 1.2.3 DockstoreApi - 1.2.3

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
denis-yuencommented, Dec 15, 2017

Huh, I wonder if this is a side-effect of using hbm2ddl validate, what’s the error message on start-up? (Oh, and re-reading, we actually don’t care about a read-only database specifically. That’s just a (or maybe was) a simple test case. The larger issue is that database errors were being suppressed as a generic 500 error. We can probably rainstorm some creative reproducible DB error conditions to test with instead on Monday/Tuesday)

0reactions
denis-yuencommented, Jan 4, 2018

Was able to test by just disabling index creation on start-up temporarily. Added a few more error conditions caught and displayed by the ui2

https://github.com/ga4gh/dockstore/pull/1090 https://github.com/dockstore/dockstore-ui2/pull/164

Read more comments on GitHub >

github_iconTop Results From Across the Web

Message: Attempt to write a read only database - Chief Architect
QUESTION. When I try to launch my Chief Architect software program, I receive a warning that states: "..\source\LibraryDatabase.cpp(2577): ...
Read more >
This database has been opened as read-only......... - MSDN
When opening the database, I am getting the following message. "This database has been opened as read-only. You can only chage data in ......
Read more >
Change SQLite database mode to read-write - Stack Overflow
My DB appeared to have been in a "locked" state so it transition to read only mode. I was able to track it...
Read more >
attempt to write a readonly database · Issue #3611 - GitHub
I am trying to use an sqlite backend for the mod_mam message archiving but I keep getting an error attempt to write to...
Read more >
Opening existing DB in read-only mode may throw exception ...
> You received this message because you are subscribed to the Google Groups "H2 Database" group. > To post to this group, send...
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