Skip to content

Unstable operation with a large number of connections #236

@NickNevzorov

Description

@NickNevzorov

Hi!

I have a large project (Delphi XE3 + ADO), after upgrade Firebird to 3.0 I saw problems with the application.

I localized the problem, on some clients' servers and locally I have the following: creating connections to the database works unstable with increasing load.

Simple code in C#, create 1000 connections to DB simultaneously:

using FirebirdSql.Data.FirebirdClient;
using System;
using System.Collections.Generic;
using System.Data.Odbc;

namespace Program
{

    class Program
    {

        static void Main(string[] args)
        {

            /* // Testing Firebird native
            List<FbConnection> fbList = new List<FbConnection>();
            for (int i = 1; i <= 1000; i++)
            {
                try
                {

                    var connection = new FbConnection("User=SYSDBA;Password=masterkey;Database=localhost/3053:c:\\rollcontrol\\rollcontrol;Pooling=false; MinPoolSize=0;MaxPoolSize=2000");
                    connection.Open();

                    fbList.Add(connection);
                    Console.WriteLine("FbConnection " + i.ToString());

                }
                catch (Exception e)
                {
                    Console.WriteLine(DateTime.Now.ToString() + ": " + e.ToString());
                }
            }*/

            List<OdbcConnection> odbcList = new List<OdbcConnection>();
            for (int i = 1; i <= 1000; i++)
            {
                try {

                    OdbcConnection DbConnection = new OdbcConnection("DSN=rollcontrol");
                    DbConnection.Open();

                    odbcList.Add(DbConnection);
                    Console.WriteLine("OdbcConnection " + i.ToString());

                } catch (Exception e) { 
                    Console.WriteLine(DateTime.Now.ToString() + ": " + e.ToString());
                }
            }

            Console.ReadKey();

        }

    }
}

ODBC driver settings:

DNS

This code working stable on several computers, on some computers not working in general, on my development PC working unstable.

For example, x32, Firebird 3.0, ODBC driver 3.0.15:

ODBC

System event log show exception Complus:

Система вызвала пользовательский компонент, а он дал сбой и создал исключение. Это свидетельствует об ошибке в компоненте. Уведомите об этом разработчика компонента и сообщите следующие сведения.
Код программы компонента: 2[ODBC][Env 018B04D0]
Имя метода: IDispenserDriver::CreateResource
Имя процесса: FirebirdODBC.exe
Исключение: c0000005
Адрес: 0X57370452

Program raise an exception and freezes (may work well, may no exception and freeze). In x64 freezes without exception.

I testes Firebird 2.5 + ODBC 2.0, Firebird 3.0 + ODBC 2.0, Firebird 3.0 + ODBC 3.0, all working unstable.

I tested ODBC connection with MS SQL Server, all working well.

Thanks

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions