Constructor of new SQLiteConnection() hangs forever
(1) By anonymous on 2022-09-02 08:32:03 [link] [source]
Version is 1.0.115 When calling the new SQLiteConnection(dbconnection) constructor it gets stuck in a cloud environment. Problem resolves itself after the entire process has been restarted, it stays like this for a few days. In a local environment problem is not happening. new SQLiteConnection() with empty conn string also gets stuck. Is it possible there is a problem there?
(2) By mistachkin on 2022-09-02 13:04:50 in reply to 1 [link] [source]
Do you have a short C# example which demonstrates the problem?
(3) By anonymous on 2022-09-02 13:36:32 in reply to 2 [link] [source]
Hello, yes, I still cannot determine if it is happening from the cloud agent maybe, what the code essentially does is firstly create a file like so:
SQLiteConnection.CreateFile(this.databaseFilePath);
and then pass it to the constructor like this:
string filePath = Path.Combine(this.databaseFilePath);
string dbConnection = String.Format("Data Source={0};DateTimeKind=Utc", filePath); //this next one is the last one that gets executed this.conn = new SQLiteConnection(dbConnection);
this.conn.Open();
we also tried creating the SQLiteConnection() with no string passed to it, result is the same. it is not problem with permissions to the directory because we tried creating a file in that database file patha few lines up and it worked... I doubt that is the reason of our problem - the constructor somehow, but it all gets stuck there, wondered if someone would have an idea what could be causing it.
(4) By mistachkin on 2022-09-02 15:21:13 in reply to 3 [link] [source]
Given the information you’ve provided, I’m unable to reproduce the problem.
I strongly suspect something within your “cloud environment” may be the root cause.
(5) By Donal Fellows (dkfellows) on 2022-09-05 16:02:10 in reply to 1 [source]
it gets stuck in a cloud environment
Is that data coming over the network or is it residing on storage that is local to the process running your code? There are a lot of ways that networked storage can fail in weird ways that don't happen with local storage.