Welcome Guest Search | Active Topics | Members | Log In | Register
Locked Database Options
Hyde
Posted: Monday, November 10, 2008 5:30:38 PM
Rank: Member

Joined: 11/7/2008
Posts: 16
Location: UK
Hi

I decided to perform a wholescale change to the hierarchy of the folder structure for my photo album which I conducted using Windows Explorer.

Then I loaded my Gallery and selected to Syncronise the database checking all the available options. This chuntered on for a while before reporting a syncronisation error.

I tried a second time with just the first option checked and got...

Code:
Error: System.Data.SQLite.SQLiteException: The database file is locked database is locked

Stack trace:

at System.Data.SQLite.SQLite3.Step(SQLiteStatement stmt) at System.Data.SQLite.SQLiteDataReader.NextResult() at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave) at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery() at System.Data.SQLite.SQLiteTransaction..ctor(SQLiteConnection connection, Boolean deferredLock) at System.Data.SQLite.SQLiteConnection.BeginDbTransaction(IsolationLevel isolationLevel) at System.Data.SQLite.SQLiteConnection.BeginTransaction() at GalleryServerPro.Data.SQLite.SQLiteGalleryServerProProvider.BeginTransaction() at GalleryServerPro.Business.SynchronizationManager.Synchronize(String synchId, IAlbum album, String userName) at GalleryServerPro.Web.task.synchronize.Synchronize(Int32 albumId, String synchId, Boolean isRecursive, Boolean overwriteThumb, Boolean overwriteOpt, Boolean regenerateMetadata)
 


How do I resolve this please?

And whilst I'm hoping *not* to do this on a regular basis is there a more robust way of achieiving a hierarchy change?

Cheers
Hyde.

PS I'll post in the other thread about my attempts to play mp4 files later.

[edit]Odd :-?? Just left it for a while. Went back to view it again having seen some unexpected hard drive activity on the serverand it's back working and displayed as it should be in the new hierarchy. Cool, I think.
Roger Martin
Posted: Tuesday, November 11, 2008 8:42:03 AM
Rank: Administration

Joined: 8/3/2007
Posts: 844
Location: Fort Atkinson, WI
When a synch is started, the database is locked for writing against any other users. When the error occurred, the lock was not released. Apparently, the lock becomes released automatically after a while (perhaps there is an internal timeout).

If this happens again, you can always recycle the IIS process to release the lock.

I'll review the code to make sure I am doing everything I can to release the lock when an error occurs (that is, rollback any transactions).


Roger Martin
Lead Developer for Gallery Server Pro
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

YAFVision Theme Created by Jaben Cargman (Tiny Gecko)
Powered by Yet Another Forum.net version 1.9.1.2 (NET v2.0) - 9/27/2007
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.