NorthArrowResearch / champ-workbench

http://workbench.northarrowresearch.com/
GNU General Public License v3.0
0 stars 0 forks source link

Database lock error occurs after 2+ hours of metric sync #42

Closed volkcj closed 5 years ago

volkcj commented 7 years ago

When syncing all QA schema metrics for CHaMP I've encountered this error 3 times. I will try to download just the schemas and VisitIDs for aux validation next.

2017-09-16_115059

volkcj commented 7 years ago

pulling metrics for 1 visit worked this morning. I'll try a larger batch.

philipbaileynar commented 7 years ago

Try:

  1. all visits within 1 watershed for a single schema.
  2. All visits within 1 watershed for all QA schemas.
  3. All visits all watersheds for a single schema.
  4. All visits all watersheds for all QA schemas.

I'm surprised at the message. I would understand a "connection time out" for a long process like this, but a locked DB is strange. Were you doing anything to the DB at the same time? Such as performing queries in SQLite Studio?

volkcj commented 7 years ago

databases were closed. the max pull that I ended up using was all watersheds for 2 year batches, 1 schema at a time. I was able to pull them all, but it took some babysitting. I'll close it, but I'm wary of the 'pull everything' query right now.

philipbaileynar commented 5 years ago

I'm experiencing this now and want to get to the bottom of it. reopening.

Message: database is locked
database is locked
Type: Exception
Severity: Error
ExceptionSource: System.Data.SQLite
ErrorInMethod: Prepare
StackTrace:    at System.Data.SQLite.SQLite3.Prepare(SQLiteConnection cnn, String strSql, SQLiteStatement previous, UInt32 timeoutMS, String& strRemain)
   at System.Data.SQLite.SQLiteCommand.BuildNextCommand()
   at System.Data.SQLite.SQLiteDataReader.NextResult()
   at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave)
   at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
   at CHaMPWorkbench.Data.MetricDefinitions.MetricDefinition.Load(String sDBCon, String sqlSelect) in \Data\Metrics\MetricDefinitions\MetricDefinition.cs:line 87
   at CHaMPWorkbench.Data.Metrics.MetricDownloader.LoadMetricDefinitionsForSchema(SQLiteTransaction& dbTrans, Int64 schemaID) in \Data\Metrics\Download\MetricDownloader.cs:line 245
   at CHaMPWorkbench.Data.Metrics.MetricDownloader.Run(List`1 visits, List`1 schemas, BackgroundWorker bgw, String sUserName, String sPassword) in \Data\Metrics\Download\MetricDownloader.cs:line 183
   at CHaMPWorkbench.Data.Metrics.frmMetricDownload.bgWorker_DoWork(Object sender, DoWorkEventArgs e) in \Data\Metrics\Download\frmMetricDownload.cs:line 106
ProductVersion: 7.0.29.0
OSVersion: Microsoft Windows NT 6.2.9200.0