What happens when Npgsql connection pool reaches Max

Posted by ClearCarbon on Stack Overflow See other posts from Stack Overflow or by ClearCarbon
Published on 2012-04-12T16:10:13Z Indexed on 2012/04/12 17:29 UTC
Read the original article Hit count: 318

Filed under:
|

Both the name of the connection string parameter and this blog post - http://fxjr.blogspot.co.uk/2010/04/npgsql-connection-pool-explained.html - lead me to believe that Npgsql wont exceed the MaxPoolSize value set in the connection string. However the docs (http://npgsql.projects.postgresql.org/docs/manual/UserManual.html) say "Max size of connection pool. Pooled connections will be disposed of when returned to the pool if the pool contains more than this number of connections. Default: 20"

This suggests that the pool can actually grow larger than MaxPoolSize and it is in fact just a level at which Npgsql starts to aggressively remove connections from the pool as soon as they are returned.

I've been searching to try and find an answer but I can find out exactly what happens when you reach MaxPoolSize. Anyone else know?

edit: I should add we are using Npgsql 2.0.6.0 due to another dependency being supported only up to that version.

© Stack Overflow or respective owner

Related posts about c#

Related posts about npgsql