OracleInstanceStore High CPU usage
Posted: Mon 09 Dec 2019 15:33
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
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