SCM

[#1010408] Connection pooling error

View Trackers | Bugs | Download .csv | Monitor

Date:
2008-06-10 10:21
Priority:
3
State:
Closed
Submitted by:
Michail Ushakov (migel_u)
Assigned to:
Nobody (None)
Npgsql Version:
2.0beta3
Category:
Group:
Resolution:
Accepted
Summary:
Connection pooling error

Detailed description
Hello,
NpgsqlConnectorPool.UngetPooledConnector(NpgsqlConnection Connection, NpgsqlConnector Connector)
has error in determining Queue that owns connector being released
error here:
// Find the queue.
if (!PooledConnectors.TryGetValue(Connector.ConnectionString, out Queue) || Queue == null)

since PooledConnectors initialized by Connection.ConnectionString and Connector.ConnectionString doesn`t match one in Connection (I do not know why???)
This test always fail and pool Queue.UseCount doesn`t decreased so we get
strange Exceptions ("Timeout while getting a connection from pool.") as soon as reach pool limit.

Patch is simple:
(!PooledConnectors.TryGetValue(Connection.ConnectionString, out Queue) || Queue == null)

Followup

Message
Date: 2008-09-08 14:06
Sender: Francisco Figueiredo jr.

Fix committed.

Attached Files:

Changes:

Field Old Value Date By
status_idOpen2008-09-08 14:06fxjr
ResolutionNone2008-09-08 14:06fxjr
close_date2008-09-08 14:062008-09-08 14:06fxjr
Powered By FusionForge