Read-only DB messaging
See original GitHub issueBug 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:
- Created 6 years ago
- Comments:5 (4 by maintainers)
Top 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 >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 FreeTop 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
Top GitHub Comments
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)
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