NServiceBus.SqlServer icon indicating copy to clipboard operation
NServiceBus.SqlServer copied to clipboard

Max Pool Size for NSB with Postgres

Open crirusu opened this issue 1 year ago • 2 comments

Describe the bug

Description

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

image

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

crirusu avatar Aug 26 '24 10:08 crirusu

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 avatar Aug 29 '24 07:08 SzymonPobiega

@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.

rob-johnson-1978 avatar Aug 31 '24 20:08 rob-johnson-1978

Released in 8.1.4

jpalac avatar Sep 26 '24 23:09 jpalac