Conversation

connection pooling and open connections

(overview of excerpts from articles in conversation)

Newsgroup: embarcadero.public.delphi.database.firedac

# Lines
wrote on 24-Sep-2013:

Hi Dmitry,
I have connection pooling enabled and I'm connecting to MySQL with 2 AdConnection at the same time.
Is it normal that I see 2 active connections on MySQL management and not just one?
I thought that when using connection pooling they would share the same one.
Thanks,
12
  
Dmitry Arefiev replied on 24-Sep-2013:

Hello Lorenzo
  (snip)

FireDAC does not open the pooled connections before they will be
  really needed. Instead FireDAC returns open connections back to
  pool instead of closing them, when they are no longed needed (eg, as
  result of ADConnection.Close call).
22
    
Lorenzo Ferrario replied on 24-Sep-2013:

Hi Dmitry,
    thanks for writing back.
    Sorry if I ask again but still I did not understand.
    Pooled = true
    AdConnection1.Connected := True -> Mysql Management shows 1 connection (sleep)
32
      
Dmitry Arefiev replied on 24-Sep-2013:

(snip)
Yes, this is correct.
      --
      With best regards,
      Dmitry Arefiev / FireDAC Architect
      FireDAC - Firebird, SQLite, MySQL, SQL Server, Oracle, PostgreSQL,
12
        
Lorenzo Ferrario replied on 24-Sep-2013:

Ok, thank you very much!
        One last thing, please. Is it also normal that having 2 active ADConnections in pooling on the same DB will not share the same transactions and the same temporary tables?
        (snip)

        
        
11
          
Dmitry Arefiev replied on 24-Sep-2013:

This is normal, as they are two different physical DB sessions.
          --
          With best regards,
          Dmitry Arefiev / FireDAC Architect
          FireDAC - Firebird, SQLite, MySQL, SQL Server, Oracle, PostgreSQL,
10
            
Lorenzo Ferrario replied on 24-Sep-2013:

Ok great, thank you.
            (snip)

            
            
            
5
FYI: Phrase searches are enclosed in either single or double quotes
 
 
Originally created by
Tamarack
Wed, 30 Sep 2020 02:06:54 UTC
Copyright © 2009-2020
HREF Tools Corp.