Example - this connection take about 10-12 seconds
Code: Select all
PgSqlConnectionStringBuilder csb = new PgSqlConnectionStringBuilder();
csb.Host = "192.168.0.3";
csb.Port = 5432;
csb.UserId = "****";
csb.Password = "*****";
csb.Database = "****";
csb.ConnectionTimeout = 30;
PgSqlConnection connection = new PgSqlConnection(csb.ConnectionString);
connection.Open();
Code: Select all
PgSqlConnectionStringBuilder csb = new PgSqlConnectionStringBuilder();
csb.Host = "91.201.154.162";
csb.Port = 5433;
csb.UserId = "****";
csb.Password = "*****";
csb.Database = "****";
csb.ConnectionTimeout = 30;
PgSqlConnection connection = new PgSqlConnection(csb.ConnectionString);
connection.Open();
This takes couple of seconds:
IPHostEntry entry = Dns.GetHostEntry("192.168.0.3");
But this - which I supose was used before - takes about 0 secons
IPAddress[] entry = Dns.GetHostAddresses("192.168.0.3");
Is it possible that You changed connection method? Is there a workaround? Or could You provide us some source code that we can change? We bought new version of dotConnect so we can update our server to Postgresql 9.6 - but w still can't.
Version 7.3 connect fine always, but it's not compatible with Pg9.6.