From: Raigo L <ra...@ma...> - 2015-01-04 02:41:50
|
Hi, problem is that the connection to Firebird server is very slow. Sometimes takes up to a minute to connect. After it has connected works very fast. Frequently also get INET/inet_error: read errno = 10054 in Firebird.log However connecting with Flamerobin or IBExpert is very fast. Firebird Superserver, ASP.NET MVC5 application. Firebird server and IIS + application are running on same machine, all connections are to 127.0.0.1 I have this issue on 2 different servers (Windows Server 2008 R2), and in my development machine (Windows7). So it is not related to certain hardware. What I have already done: upgraded to latest Firebird 2.5.3 and ADO.NET Data provider 4.6.0 Database Page Size 16384 I read http://www.firebirdfaq.org/faq52/ and already checked those. exists both c:\windows\system32\drivers\etc\hosts 127.0.0.1 localhost c:\windows\system32\drivers\etc\services gds_db 3050/tcp fb #Firebird In windows Firewall opened port 3050. Also have tried turning off Windows firewall, no difference I use extension .FDB I have run netsh winsock reset in application wherever I open connection I also close it. typical pattern I use is Web.config file <add name="ConnectionString2" connectionString="Charset=UTF8;DataSource=127.0.0.1;Server Type=0;Port=3050;Database=C:\mydir\mydb.fdb;User=sysdba;Password=masterkey;Pooling=true;MinPoolSize=0;MaxPoolSize=100;Connection lifetime=15;Packet Size=8192;" providerName="FirebirdSql.Data.FirebirdClient" /> C# string connectionString = ConfigurationManager.ConnectionStrings["ConnectionString2"].ConnectionString; using (FbConnection connection = new FbConnection(connectionString)) { connection.Open(); using (FbCommand command = new FbCommand("select * from sp_get_event_type (?, ?);", connection)) { command.Parameters.Add("category_id", FbDbType.Integer).Value = category_id; command.Parameters.Add("language_code", FbDbType.Text).Value = language_code; FbDataReader reader = command.ExecuteReader(); while (reader.Read()) { event_type_items.Add(new event_type { event_type_id = reader.GetInt32(reader.GetOrdinal("event_type_id")), event_type_name = reader["event_type_name"].ToString() }); } reader.Close(); } connection.Close(); } what else could be done to improve slow connection to Firebird? Raigo |