Hi,

we have used sqlite3 with the Finisar.SQLite.NET wrapper in our applications 
too. And there were same unreproduceable problems.
After switching to the Mono.Data.SqliteClient.dll wrapper all problem 
disappears.
Try to use the Mono wapper, Finisar is buggy. :-(

Sylko


-----Ursprüngliche Nachricht-----
Von: Onnig Kouyoumdjian [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 28. September 2006 23:47
An: sqlite-users@sqlite.org
Betreff: [sqlite] Problem with close

I'm using the sqlite3 dll with the Finisar.SQLite.NET wrapper in our
application written in C#. Currently I'm using version 3.3.7, but I have
been having the problem going back to version 3.3.4 which is when we
started using SQLite.  Most of the time everything works fine, but every
once in a blue moon (or so) when a request to close a connection is
made, SQLITE_ERROR is returned.  I've been able to determine that
SQLITE_ERROR is returned because magic happened to be SQLITE_BUSY when I
called close.  

One of my biggest problems is that I have not yet been able to reproduce
this problem on demand.  I've written a test program that simulates the
actual application but so far I can't make it fail on my development
environment.  

I have not come to any conclusions whether the problem is from my code,
the SQLite.NET wrapper or SQLite.  

One thing that doesn't make sense to me is why SQLite was BUSY when I
called close. I don't get an exception or busy before I call close,
since I would log such a thing and I don't see anything in the log until
the SQLITE_ERROR.

Once the error occurs, I can ignore it and continue to use the database
by opening a new connection and everything works fine.  My problem is
that once the error happens during a close, I'm guessing that a VM is
now hanging around somewhere and is not released.  This causes a problem
for me where at the end of a job that my application runs, I delete the
database because it is no longer needed, but I can't in this case
because the file is locked in some way.  

My application is a Windows service, so the only way that I have found
so far to clear it up is the restart the service.  

My application does use two threads for database calls, but the database
is called through a singleton class and I make sure that there is a lock
for all of the database calls including the open and close. So there
should never be any time where two threads would make a call to a
specific database.  I have two databases and it is possible that the two
threads call the different databases at the same time.

I am compiling the sqlite dll myself with VS.NET 2003 making sure it is
compiled with THREADSAFE=1.

I do have a theory that this problem shows up when the hard drive is
under a heavy load, but so far haven't been able to prove it. 

I will take suggestion on a fix or a Band-Aid.  The Band-Aid being: once
the job is done if I can find a way for the sqlite dll to release the
files, then I can delete them and all will be well.  

Thanks,

Onnig



-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------




-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to