Warning message for missing maximum pool size setting contains incorrect instructions in PostgreSQL
Closed this issue · 3 comments
Symptoms
Not specifying an explicit connection pool size via the connection string displays an incorrect warning message:
Maximum connection pooling value (Max Pool Size=N) is not configured on the provided connection string. The default value (100) will be used.
Max Pool Size
is not the correct key and if used will result in an error starting the endpoint:
Unhandled exception. System.ArgumentException: Couldn't set max pool size (Parameter 'max pool size')
Who's affected
All users of the PostgresSQL transport
Root cause
The validation logic is using the incorrect key Max Pool Size
instead of Maximum Pool Size
User report
When we run NSB with a connection string without specifying Max Pool Size we receive the following warning:
conn string exanple :
Host=myHost;Port=3306;Database=myDb;Username=myDbUser;Password=xxx;SslMode=Prefer;Trust Server Certificate=true;Include Error Detail=true;Connection Idle Lifetime=30
"Maximum connection pooling value (Max Pool Size=N) is not configured on the provided connection string. The default value (100) will be used."
When we try to setup Max Pool Size with a connection string like this:
Host=myHost;Port=3306;Database=myDb;Username=myDbUser;Password=xxx;SslMode=Prefer;Trust Server Certificate=true;Include Error Detail=true;Max Pool Size=20;Connection Idle Lifetime=30
the service cannot start - Hosting failed to start
In the code you check for Max Pool Size, but postgresl is using Maximum
https://www.npgsql.org/doc/connection-string-parameters.html
Expected behavior
Use the Maximum Pool Size
Actual behavior
Versions
Steps to reproduce
Use the connection string above without setting any pool siize - start the service => Warning
Use the connection string with Max Pool Size => the service won't start.
Relevant log output
No response
Additional Information
Workarounds
Possible solutions
Additional information
Hi!
Thanks for reporting it. It looks like a bug that is related to sharing some of the codebase with SQL Server variant of the transport. We'll take care of it in the next release.
@SzymonPobiega as per discuss issue I was asked to raise this too - didn't realise it was already raised, apologies. I've closed my issue.