QutEcoacoustics / baw-server

The acoustic workbench server for storing and managing ecoacoustic data. Manages the structure and audio data. Provides an API for clients access.
Apache License 2.0
9 stars 4 forks source link

Corrupt SQLite file error #384

Open atruskie opened 5 years ago

atruskie commented 5 years ago
 SQLite3::CorruptException occurred in analysis_jobs_results#show:

database disk image is malformed
vendor/bundle/ruby/2.3.0/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:91:in `initialize'
------------------------------- Request:
* URL        : https://www.ecosounds.org/analysis_jobs/system/results/552495/zooming/Towsey.Acoustic/d8c9f6f2-20c1-48f2-a493-86a118ad0ad8_20180411-124251Z__Tiles.sqlite3/BLENDED.Tile_20180411T120000Z_60.png
* HTTP_REFERER                                   : https://www.ecosounds.org/visualize?siteId=1107&extent0=1466501941613&extent1=1586165941613&lane=1107
vendor/bundle/ruby/2.3.0/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:91:in `initialize'
vendor/bundle/ruby/2.3.0/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:91:in `new'
vendor/bundle/ruby/2.3.0/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:91:in `prepare'
vendor/bundle/ruby/2.3.0/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:137:in `execute'
vendor/bundle/ruby/2.3.0/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:290:in `get_first_value'
lib/modules/file_systems/sqlite.rb:140:in `exists'
lib/modules/file_systems/sqlite.rb:90:in `directory_exists?'
lib/modules/file_systems/combined.rb:21:in `block in directory_exists?'
lib/modules/file_systems/combined.rb:87:in `check_and_open_sqlite'
lib/modules/file_systems/combined.rb:20:in `directory_exists?'
app/controllers/analysis_jobs_results_controller.rb:126:in `block in show_results'
app/controllers/analysis_jobs_results_controller.rb:126:in `select'
app/controllers/analysis_jobs_results_controller.rb:126:in `show_results'
app/controllers/analysis_jobs_results_controller.rb:47:in `show'
atruskie commented 5 years ago

I think the recommended fix here is to check if this happens and then to delete the corrupt file.

Eventually, our job scheduler should notice the missing tile files and regenerate it.