We are using dotConnect PostgreSQL 7.3.161.0.
We have recently changed our software to use SSL certificates in our connections to the database (previously we were not). After making these changes we frequently experience lock-ups when making calls into Devart. It seems to be somewhat random where the lockup occurs; it happens when opening a connection, closing one, or in the middle of a LINQ query.
Our application uses a single open connection, in a single thread. From that we create a new DB context anytime a task needs to be done and we dispose of it immediately. I have included the code used to setup and tear down a connection and a typical use of the DB context object (maybe we are doing something wrong).
Opening a connection...
Code: Select all
PgSqlConnectionStringBuilder connStringBuilder = new PgSqlConnectionStringBuilder();
connStringBuilder.UserId = UserId;
connStringBuilder.Host = Host;
connStringBuilder.Port = Int32.Parse(Port);
connStringBuilder.Password = Password;
connStringBuilder.Database = DatabaseName;
connStringBuilder.PersistSecurityInfo = false;
connStringBuilder.Pooling = true;
connStringBuilder.Schema = "public";
SqlConnection = new PgSqlConnection(connStringBuilder.ToString());
SqlConnection.StateChange += SqlConnectionStateChange;
SqlConnection.ConnectionTimeout = ConnectionTimeout;
SqlConnection.SslOptions.SslMode = SslMode.Require;
SqlConnection.Open();
DbChangeAlerter = new PgSqlAlerter(SqlConnection, alerts);
DbChangeAlerter.Alert += DbNotificationAlert;
DbChangeAlerter.Start();
Code: Select all
DbChangeAlerter.Stop();
DbChangeAlerter.Alert -= DbNotificationAlert;
DbChangeAlerter.Dispose();
SqlConnection.StateChange -= SqlConnectionStateChange;
SqlConnection.Close();
Code: Select all
int count;
using (DataContextFoo db = new DataContextFoo(SqlConnection))
{
IQueryable<CollectionSet> result = db... // some query
count = result.Count();
}
Devart.Data.PostgreSql.dll!Devart.Security.SSL.ah.d
Your help would be greatly appreciated in coming up with a solution.
Please let me know what other information would help you with this.