Page 1 of 1

OracleInstanceStore High CPU usage

Posted: Mon 09 Dec 2019 15:33
by Arden Carl
In our application a user can invoke a workflow from a menu item. Each time they do so we create a new workflow application and configure the instance store using the Devart.Data.Oracle.DurableInstancing.OracleInstanceStore class.

Even when the workflow application has finished we are observing the class continuing to create threads and attempt to read the database resulting in more CPU usage. If the user continues to execute further workflows the load keeps increasing until the machine becomes unresponsive at which time we have to terminate the host application.

Our application also supports Sql Server for our customers which use Sql Server. In this case we use the native System.Activities.DurableInstancing.SqlWorkflowInstanceStore class which does not exhibit this behaviour.

Here's a call stack showing the activity of the OracleInstanceStore class:

[Managed to Native Transition] Annotated Frame
> OciCall.dll!OciDynamicType.OCIStmtExecute(System.Runtime.InteropServices.HandleRef value, System.Runtime.InteropServices.HandleRef value, System.Runtime.InteropServices.HandleRef value, int value, int value, int value, int value, int value) Unknown Non-user code. Binary was not built with debug information.
Devart.Data.Oracle.dll!Devart.Data.Oracle.cn.a(object A_0) Unknown Non-user code. Binary was not built with debug information.
Devart.Data.Oracle.dll!Devart.Data.Oracle.cn.a(int A_0, Devart.Data.Oracle.b8 A_1) Unknown Non-user code. Binary was not built with debug information.
Devart.Data.Oracle.dll!Devart.Data.Oracle.OracleCommand.InternalExecute(System.Data.CommandBehavior behavior, System.IDisposable disposable, int startRecord, int maxRecords, bool nonQuery) Unknown Non-user code. Binary was not built with debug information.
Devart.Data.dll!Devart.Common.DbCommandBase.ExecuteDbDataReader(System.Data.CommandBehavior behavior, bool nonQuery) Unknown Non-user code. Binary was not built with debug information.
Devart.Data.Oracle.dll!Devart.Data.Oracle.OracleCommand.ExecuteNonQuery() Unknown Non-user code. Binary was not built with debug information.
Devart.Data.Oracle.WorkflowFoundation.dll!Devart.Data.Oracle.DurableInstancing.as.a(bool A_0) Unknown Non-user code. Binary was not built with debug information.
Devart.Data.Oracle.WorkflowFoundation.dll!Devart.Data.Oracle.DurableInstancing.ag.c() Unknown Non-user code. Binary was not built with debug information.
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object state) Unknown Non-user code. Skipped loading symbols.
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown Non-user code. Skipped loading symbols.
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown Non-user code. Skipped loading symbols.
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown Non-user code. Skipped loading symbols.
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart() Unknown Non-user code. Skipped loading symbols.
[Native to Managed Transition] Annotated Frame

Re: OracleInstanceStore High CPU usage

Posted: Sat 14 Dec 2019 21:25
by Shalex
Thank you for your report. We have asked for additional information by email.

Re: OracleInstanceStore High CPU usage

Posted: Thu 02 Jan 2020 14:22
by Shalex
The issue was fixed in the C:\Program Files (x86)\Devart\dotConnect\Oracle\WF Services\NET45\OracleInstanceStoreLogic45.sql script shipped with v8.5.521 and higher by adding the no_data_found exception handler to the InstanceStoreLogic.UnlockInstance stored procedure.