Page 1 of 1

Proxy User connection leaking pool connections on login failure

Posted: Fri 22 May 2020 16:12
by scott_mathieson
Hi,

I am using dotConnect for Oracle version 9.7.734 and running into an issue when using proxy connection whereby a failed login for a proxied user results in the internal proxy user connection to be left open and not returned to the pool. To replicate, create a data source with connection like:

Code: Select all

<add name="ProxiedConnectionString" connectionString="Proxy User Id=proxy_user;Proxy Password=proxy_user_password;Server=MYSERVER;Pooling = true; Max Pool Size=1" providerName="Devart.Data.Oracle" />
If you then use the connection string and add a User Id=does_not_exist entry, when attempting to open the connection, it will fail (as the user doesn't exist but will leave a connected session for proxy_user. If you then attempt to create another connection in the same process with a valid User Id, this will fail as there are no free connections in the pool. The same thing happens if you try to proxy a connection for a user who's account is locked. There doesn't seem to be any way to free up the used connection other than restarting the process. This seems like a bug although haven't found any other people mentioning it so perhaps there is something odd in my configuration.

Re: Proxy User connection leaking pool connections on login failure

Posted: Thu 04 Jun 2020 17:16
by Shalex
Thank you for your report. We have reproduced the issue and will notify you when it is fixed.

Re: Proxy User connection leaking pool connections on login failure

Posted: Tue 13 Oct 2020 07:55
by TweeGo
Hi,

I think we are experiencing the same kind op problem. We are using dotConnect combined with EFCore. When a connection is created on a account that is locked then there is no way to recover from this error other than by restarting the application.

Stept to reproduce
  • Lock account in Oracle
  • Start application and create connection
  • Receive message ‘ORA-28000: the account is locked
  • Unlock the account
  • Only way to recover is restart application
We tried disabling the pool, Validating Connection, Connection Lifetime, upgrading latest release, disabling direct mode but there nothing to recover from this error state.

It is important to note that the account must be locked before te connection gets added to the pool. If the account gets locked during its lifetime in the pool the system works as designed (combined with connection lifetime).

If needed I can provide you with a console app I have created to reproduce the problem.

Hope to hear from you soon.

Regards, Peter

Re: Proxy User connection leaking pool connections on login failure

Posted: Fri 16 Oct 2020 19:46
by Shalex
TweeGo wrote: Tue 13 Oct 2020 07:55When a connection is created on a account that is locked then there is no way to recover from this error other than by restarting the application.
The issue you have encountered is not related to proxy authentication, is it?
TweeGo wrote: Tue 13 Oct 2020 07:55If needed I can provide you with a console app I have created to reproduce the problem.
Please upload your test project to some file exchange server and send us the download link via our contact form.