Closed koraycsharp closed 2 years ago
Pooling is on by default. You may be using two connections, but there can be idle connections in the pool. That would be my guess.
Yes, but i dont understand why there are 7 inactive connections instead of 2. Always 7.
When i turn off pooling, all sessions are closed and there is no session as a result of the operation.
Connection pool algorithms will create a buffer of idle connections in the pool that will be ready to dispense. Those idle connections will register as inactive sessions in the database and don't go away immediately after a connection is closed. Most algorithms let pools drain idle connections over a longer period of time to prevent in case activity picks up again.
In your scenario, the ODP.NET connection pooling algorithm is creating seven connections. That leaves a buffer of five that can be dispensed when two of the connections are being used.
Hello, i have problems with inactive sessions. When i open new connection in connection, 7 inactive sessions are created. My code just like that,
When command ExecuteReader called, 7 inactive sessions are created. The screenshot of the session browser is below.