Inventory WIP Reconciliation Report Error

Hi, we are getting the following error when running the Inventory WIP Reconciliation Report for “Only Unposted to the G/L” When we run “Only Posted to the G/L” the report runs fine. Epicor has been unable to provide a solution so I thought I’d check to see if anyone here has run into this before. Is it the volume of open jobs perhaps?

Error: System.Threading.ThreadAbortException: Thread was being aborted.
at SNIReadSyncOverAsync(SNI_ConnWrapper* , SNI_Packet** , Int32 )
at SNINativeMethodWrapper.SNIReadSyncOverAsync(SafeHandle pConn, IntPtr& packet, Int32 timeout)
at System.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync()
at System.Data.SqlClient.TdsParserStateObject.TryReadNetworkPacket()
at System.Data.SqlClient.TdsParserStateObject.TryPrepareBuffer()
at System.Data.SqlClient.TdsParserStateObject.TryReadByte(Byte& value)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) at System.Data.Entity.Infrastructure.Interception.InternalDispatcher1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func3 operation, TInterceptionContext interceptionContext, Action3 executing, Action3 executed) at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.Reader(DbCommand command, DbCommandInterceptionContext interceptionContext) at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior) at System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext context, ObjectParameterCollection parameterValues) at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
at System.Data.Entity.Core.Objects.ObjectQuery1.<>c__DisplayClass7.<GetResults>b__5() at System.Data.Entity.Core.Objects.ObjectQuery1.GetResults(Nullable1 forMergeOption) at System.Data.Entity.Core.Objects.ObjectQuery1.<System.Collections.Generic.IEnumerable.GetEnumerator>b__0()
at System.Data.Entity.Internal.LazyEnumerator1.MoveNext() at System.Linq.Enumerable.Single[TSource](IEnumerable1 source)
at System.Data.Entity.Core.Objects.CompiledQuery.ExecuteQuery[TResult](ObjectContext context, Object[] parameterValues)
at System.Data.Entity.Core.Objects.CompiledQuery.Invoke[TArg0,TArg1,TArg2,TResult](TArg0 arg0, TArg1 arg1, TArg2 arg2)
at Epicor.Data.DBExpressionCompiler.GetResult[TDataContext,TQuery,TResult](Func3 executeQuery, Cache cacheSetting, TDataContext dataContext, TQuery query) in C:\_Releases\ICE\UD10.2.500.16FW\Source\Framework\Epicor.System\Data\DBExpressionCompiler.cs:line 445 at Epicor.Data.DBExpressionCompiler.InvokeSingle[TDataContext,TQuery,TResult](Expression expression, Cache currentCacheSetting, Boolean cacheQuery, TDataContext dataContext, Func2 getDataCacheKey, Func2 compileQuery, Func3 executeQuery) in C:_Releases\ICE\UD10.2.500.16FW\Source\Framework\Epicor.System\Data\DBExpressionCompiler.cs:line 306
at Epicor.Data.DBExpressionCompiler.<>c__DisplayClass34_0`4.b__0(TContext context, TArg1 arg1, TArg2 arg2) in C:_Releases\ICE\UD10.2.500.16FW\Source\Framework\Epicor.System\Data\DBExpressionCompiler.Generated.cs:line 1110
at Erp.Internal.PE.COSAndWIPPre_Post.BuildTWip() in C:_Releases\ERP\UD10.2.500.16\Source\Server\Internal\PE\CosAndWip\CostCalculation.cs:line 853
at Erp.Internal.PE.COSAndWIPPre_Post.RunProcess() in C:_Releases\ERP\UD10.2.500.16\Source\Server\Internal\PE\CosAndWip\COSAndWIPPre_Post.cs:line 639
at Erp.Internal.PE.Pre_PostBase._RunProcess(Int64 instance_TaskNum, String groupID, PostingMode mode, Boolean skipPEDataInit) in C:_Releases\ERP\UD10.2.500.16\Source\Server\Internal\PE\Pre_PostBase\Pre_PostBase.cs:line 173

“Epicor102500-Test”: A communication error occurred trying to run task ID 4979666 for agent “SystemTaskAgent” on the application server (User: “rnewell”, Task Description: “Inventory WIP Reconciliation Report”).
If this continues to happen investigate if you need to increase the receive and send timeouts in your web.config.
Error details:
System.ServiceModel.CommunicationException: The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error.

Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Ice.Contracts.RunTaskSvcContract.RunTask(Int64 ipTaskNum)
at Ice.Proxy.Lib.RunTaskImpl.RunTask(Int64 ipTaskNum) in C:_Releases\ICE\RL10.2.500.0FW\Source\Shared\Contracts\Lib\RunTask\RunTaskImpl.cs:line 147
at Ice.TaskAgentCore.ServiceCaller.<>c__DisplayClass34_0.<RunTask_RunTask>b__0(RunTaskImpl impl)
at Ice.TaskAgentCore.ImplCaller.RunTaskImplCaller1.<>c__DisplayClass4_0.<Call>b__0(TImpl impl) at Ice.TaskAgentCore.ImplCaller.RunTaskImplCaller1.Call[TResult](Func2 doWork, ExceptionBehavior communicationExceptionBehavior, ExceptionBehavior timeoutExceptionBehavior) at Ice.TaskAgentCore.ImplCaller.RunTaskImplCaller1.Call(Action`1 doWork, ExceptionBehavior communicationExceptionBehavior, ExceptionBehavior timeoutExceptionBehavior)
at Ice.TaskAgentCore.ServiceCaller.RunTask_RunTask(Int64 sysTaskNum, ExceptionBehavior communicationExceptionBehavior, ExceptionBehavior timeoutExceptionBehavior)
at Ice.TaskAgentCore.ScheduleProcessor.CallServiceAction(SysTaskRow sysTaskRecord, SysTaskParamRow companyParamRecord, ServiceCallArguments serviceCallArguments)

Is this always happening after the same amount of time, for example always after 1 hour?

In that case it might be a timeout.

Sometimes it’s after an hour sometimes it 10 hours. I have 4 companies and 2 of them have very few jobs and they never give me a problem. My 2 larger companies are a constant problem. We also have issues with the capture post. Most month ends we shut down each of the 4 app servers, detach the database from Sql and check the box clear active connections. Then reattach the database start each app server and then the process works. Just stopping and starting the app servers does not help.

Is it possible that you have some process that recycles/restarts the app server causing the active program to abort?

Not that I am aware of. I asked my IT manager and he say’s no.

Out of curiosity can you check what are the timeouts(query, command, lock and transaction) in web.config?

Also, I know you said no but still try checking if the last time the app pool was started/recycled matches when the report failed.

I am wondering if there is a problem with your COS-WIP Control Code or maybe the transaction type needs to be updated.

Charlie Smith

CRS Consulting Svcs

(860) 919-1708

CTCharlie@outlook.com

<add key="queryTimeout" value="0" /> 
<add key="CommandTimeout" value="0" /> 
    <add key="LockTimeout" value="180000" /> 
 <defaultSettings timeout="05:00:00" />

Not sure about the COS-WIP control code but the transaction type is the most recent.

The app pool was last stopped and started on Friday. I had errors yesterday and a number of times today while testing.

Can you turn on server logging using AppServer.config and also try checking Event Viewer for any more errors and info.

Hopefully there is more info somewhere than the generic thread aborted.

Will give that a go. thx

Oh, and also check the Task Agent operation timeout setting.

@rnewell What happens if you reduce the number of records by reducing the dates? Does it complete for a week’s worth of transactions? Two weeks? Three weeks?

Even if I run it for 1 day it gives the error.