79315562

Date: 2024-12-29 12:23:16
Score: 0.5
Natty:
Report link

I’m using the Npgsql driver in a .NET application to connect to a CockroachDB instance. I set Minimum Pool Size=100 in the connection string, expecting the pool to pre-open 100 connections at application startup.

What's your expectation here exactly with regards to "application startup"? Opening a connection is a heavy, asynchronous operation, when exactly are you expecting that to occur?

Because there's no natural, implicit place for such a startup operation, as @UtlaMincykun wrote you can simply do a quick for loop and open the connections yourself wherever is suitable for you.

Reasons:
  • Blacklisted phrase (1): regards
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • User mentioned (1): @UtlaMincykun
  • High reputation (-2):
Posted by: Shay Rojansky