Npgsql.NpgsqlException The connection pool has been exhausted, either raise MaxPoolSize (currently 100) or Timeout currently 15 seconds
I am running a query which loads pages of data for different tenants. Each tenant has its own database and the table has more than 500K records. I get this error from time to time and not always. It seems that it happens due to the connection not being disposed of properly but I am using the using
block. Here is my code what am I missing?