npgsql preferred connection pooling usage

2k views Asked by At

I've been noticing connection pool being exhausted...I dont get full blown exception because its happening behind web app... but basically

Npgsql.NpgsqlConnectorPool.RequestCOnnector(Npgsql.MpgsqlConnection)

My web app basically breaks, and fails to create any new connections. If I restart web app server, or database engine, things start to work again for a short time. My connectionstring specifies min 15 connections in the pool, 30 max.

My question is in the context of a web application I should be able to just get a connection

using(var connection = new NpgsqlConnection(connectionstring)){
    connection.open(); 
    dostuff();
}

Am I doing something wrong? Disabling pooling ends up working, and performing well, but seems like the wrong way to solve this problem.

0

There are 0 answers