I've got a C# program that uses SQLite as the data store and as the ASP.NET membership & profile repositories. The program is not an ASP.NET application; it is a WPF application that uses the ASP.NET membership & profile providers. This program is the front-end for our application.
Just before the program terminates, it writes data to the user's profile. The connection string in app.config sets the default timeout to 120 seconds. However, I've seen cases where the operation may take a lot longer than 120 seconds, like it's still waiting to shut down after 2 hours.
According to the documentation for the SQLiteCommand.CommandTimeout property, the property is:
The amount of time to wait for the connection to become available before erroring out
I got this bit of information from the SQLite.NET.chm file that I downloaded with the package.
This description does not sound like the property controls how long the program waits for the query to complete; it sounds like it's waiting for the connection to become available, and if it is available quickly, but the query doesn't complete right away, you could wait a long time. Like in the case of a deadlock (there is another application that uses the same database; it's this program's back end).
Am I right? Or will the operation timeout if the query doesn't complete in the time specified in this property?
Aucun commentaire:
Enregistrer un commentaire