Particular / NServiceBus.SqlServer

SQL Server Transport for NServiceBus
https://docs.particular.net/nservicebus/sqlserver/
Other
42 stars 35 forks source link

Max Pool Size for NSB with Postgres #1411

Open crirusu opened 3 weeks ago

crirusu commented 3 weeks ago

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

SzymonPobiega commented 2 weeks ago

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.

rob-johnson-1978 commented 2 weeks ago

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