Page 1 of 1

Jiwa Retry Connect

PostPosted: Thu Jul 08, 2021 10:51 am
by SBarnes
With Jiwa's baked in reconnect and retry SQL functionality is failed attempts logged anywhere?

Re: Jiwa Retry Connect

PostPosted: Thu Jul 08, 2021 11:51 am
by Scott.Pearce
No.

Re: Jiwa Retry Connect  Topic is solved

PostPosted: Thu Jul 08, 2021 6:31 pm
by Mike.Sheen
SBarnes wrote:With Jiwa's baked in reconnect and retry SQL functionality is failed attempts logged anywhere?


If you set the system setting DisableConnectionResilience to be true, you will get an exception thrown immediately instead of Jiwa silently attempting to re-connect. The user will get an exception shown to them and the current operation will be aborted. If you want a log of those occurrences - We added the ability to log transient faults AND sql exceptions (which I believe covers when connections are broken) as part of DEV-8084 in 07.02.01 SR3.

The DEV issue linked above has a plugin attached which will log to the event log when either a transient fault or a sql exception occurs. For obvious reasons it doesn't log to a table - so you'll need to the gather the event logs from all the client machines to have any useful information.

Re: Jiwa Retry Connect

PostPosted: Thu Jul 08, 2021 6:40 pm
by Mike.Sheen
Just to be clear: you don't need to set DisableConnectionResilience to true for the above plugin to log transient faults - and it's transient faults which get retried multiple times after sleeping for the configured retry interval.

DisableConnectionResilience only stops Jiwa from trying to re-connect to the database connection is in a Broken or Closed state - that is only attempted once and if the reconnect fails, then a SQLOpenConnectionFailure is thrown.

Re: Jiwa Retry Connect

PostPosted: Thu Jul 08, 2021 6:50 pm
by SBarnes
Thanks Mike,

I now remember where this got used before in looking at speed issues, this is related to a client who uses Azure and Azure SQL and who certainly stress test things, they are running under 7.2.0 SR6, Transient fault logging will compile under that version but Connectivity fault logging won't due to the line


Code: Select all
Plugin.Manager.Database.SqlException += delegate(System.Data.SqlClient.SqlException ex, System.Data.SqlClient.SqlCommand SQLCommand) { SqlException(Plugin, ex, SQLCommand); };


For their REST API I have just added the ability to configure the connection and command time outs as well as the ability to retry in the working with web hooks.