We have a sales order with 87 Lines, and 9,706 releases spread out among all of those lines.
When we load that Sales Order in the Sales Order Entry screen, it takes between 45-55 seconds to load.
When we try to Close or Reopen a release, sometimes it works, however we are receiving this error very frequently (this pops up after the 180 second timeout period is reached):
Server Side Exception
A server error occurred. Review the server event logs for details.
Exception caught in: Epicor.ServiceModel
Error Detail
============
Description: A server error occurred. Review the server event logs for details.
Program: Epicor.System.dll
Method: ProvideFault
Line Number: 32
Column Number: 13
Server Trace Stack: at Epicor.Hosting.Wcf.ErrorHandler.ProvideFault(Exception error, MessageVersion version, Message& fault) in C:\_Releases\ICE\ICE3.2.400.22\Source\Framework\Epicor.System\Hosting\Wcf\ErrorHandler.cs:line 32
at System.ServiceModel.Dispatcher.ErrorBehavior.ProvideFault(Exception e, FaultConverter faultConverter, ErrorHandlerFaultInfo& faultInfo)
at System.ServiceModel.Dispatcher.ErrorBehavior.ProvideMessageFaultCore(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage8(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.ProcessError(Exception e)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
at System.ServiceModel.Dispatcher.ChannelHandler.DispatchAndReleasePump(RequestContext request, Boolean cleanThread, OperationContext currentOperationContext)
at System.ServiceModel.Dispatcher.ChannelHandler.HandleRequest(RequestContext request, OperationContext currentOperationContext)
at System.ServiceModel.Dispatcher.ChannelHandler.AsyncMessagePump(IAsyncResult result)
at System.ServiceModel.Dispatcher.ChannelHandler.OnAsyncReceiveComplete(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.SecurityChannelListener`1.ReceiveItemAndVerifySecurityAsyncResult`2.InnerTryReceiveCompletedCallback(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.TransportDuplexSessionChannel.TryReceiveAsyncResult.OnReceive(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.SynchronizedMessageSource.ReceiveAsyncResult.OnReceiveComplete(Object state)
at System.ServiceModel.Channels.SessionConnectionReader.OnAsyncReadComplete(Object state)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken)
at System.Net.Security.NegotiateStream.ProcessFrameBody(Int32 readBytes, Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.NegotiateStream.ReadCallback(AsyncProtocolRequest asyncRequest)
at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result)
at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes)
at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.ConnectionStream.IOAsyncResult.OnAsyncIOComplete(Object state)
at System.Net.Sockets.SocketAsyncEventArgs.OnCompleted(SocketAsyncEventArgs e)
at System.Net.Sockets.SocketAsyncEventArgs.FinishOperationSuccess(SocketError socketError, Int32 bytesTransferred, SocketFlags flags)
at System.Net.Sockets.SocketAsyncEventArgs.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
Client Stack Trace
==================
at Epicor.ServiceModel.Channels.ImplBase`1.ShouldRethrowNonRetryableException(Exception ex, DataSet[] dataSets)
at Erp.Proxy.BO.SalesOrderImpl.CloseRelease(Int32 iOrderNum, Int32 iOrderLine, Int32 iOrderRelNum)
at Erp.Adapters.SalesOrderAdapter.CloseRelease(Int32 iOrderNum, Int32 iOrderLine, Int32 iOrderRelNum)
At the same time, the following error appears in the Event Viewer under Epicor App Server:
System.Data.Entity.Core.EntityCommandExecutionException: An error occurred while reading from the store provider's data reader. See the inner exception for details. ---> System.Data.SqlClient.SqlException: Lock request time out period exceeded.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryHasMoreRows(Boolean& moreRows)
at System.Data.SqlClient.SqlDataReader.TryReadInternal(Boolean setTimeout, Boolean& more)
at System.Data.SqlClient.SqlDataReader.Read()
at System.Data.Entity.Core.Common.Internal.Materialization.Shaper`1.StoreRead()
--- End of inner exception stack trace ---
at System.Data.Entity.Core.Common.Internal.Materialization.Shaper`1.HandleReaderException(Exception e)
at System.Data.Entity.Core.Common.Internal.Materialization.Shaper`1.StoreRead()
at System.Data.Entity.Core.Common.Internal.Materialization.Shaper`1.SimpleEnumerator.MoveNext()
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 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](Func`3 executeQuery, Cache cacheSetting, TDataContext dataContext, TQuery query) in C:\_Releases\ICE\ICE3.2.400.22\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, Func`2 getDataCacheKey, Func`2 compileQuery, Func`3 executeQuery) in C:\_Releases\ICE\ICE3.2.400.22\Source\Framework\Epicor.System\Data\DBExpressionCompiler.cs:line 306
at Epicor.Data.DBExpressionCompiler.<>c__DisplayClass34_0`4.<Compile>b__0(TContext context, TArg1 arg1, TArg2 arg2) in C:\_Releases\ICE\ICE3.2.400.22\Source\Framework\Epicor.System\Data\DBExpressionCompiler.Generated.cs:line 1110
at Erp.Triggers.OrderDtl.WriteTrigger.write(OrderDtl NewOrderDtl, OrderDtl OldOrderDtl) in C:\_Releases\ERP\UD10.2.400.22\Source\Server\Db\Triggers\OrderDtl\write.cs:line 202
at Erp.Triggers.OrderDtl.WriteTrigger.Write(OrderDtl NewOrderDtl, OrderDtl OldOrderDtl) in C:\_Releases\ERP\UD10.2.400.22\Source\Server\Db\Triggers\OrderDtl\write.cs:line 189
at Ice.DataTrigger`2.Ice.ILinqTrigger.Write(LinqRow newRecord, LinqRow oldRecord) in C:\_Releases\ICE\ICE3.2.400.22\Source\Framework\Epicor.Ice\Triggers\TriggerBase.cs:line 22
at Ice.Triggers.TriggerQueue.ExecuteWriteTrigger(IceDataContext context, LinqRow modifiedRecord, LinqRow originalRecord) in C:\_Releases\ICE\ICE3.2.400.22\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 303
at Ice.Triggers.TriggerQueue.RunWriteTriggerInNewLevel(IceDataContext context, LinqRow modifiedRecord, LinqRow originalRecord, Boolean forAddedRow) in C:\_Releases\ICE\ICE3.2.400.22\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 164
at Ice.Triggers.TriggerQueue.<>c__DisplayClass11_0.<RunWriteTrigger>b__1() in C:\_Releases\ICE\ICE3.2.400.22\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 155
at Ice.Triggers.TriggerQueue.RunAtNewLevel(Func`1 buildTriggerRunState, Action action) in C:\_Releases\ICE\ICE3.2.400.22\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 508
at Ice.Triggers.TriggerQueue.RunTriggers(IceDataContext context) in C:\_Releases\ICE\ICE3.2.400.22\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 90
at Ice.IceDataContext.RunUntilAllTriggersHaveExecuted() in C:\_Releases\ICE\ICE3.2.400.22\Source\Framework\Epicor.System\Data\IceDataContext.cs:line 580
at Ice.Triggers.TriggerQueue.RunAtNewLevel(Func`1 buildTriggerRunState, Action action) in C:\_Releases\ICE\ICE3.2.400.22\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 508
at Ice.IceDataContext.Validate[TLinqRow](TLinqRow row) in C:\_Releases\ICE\ICE3.2.400.22\Source\Framework\Epicor.System\Data\IceDataContext.cs:line 337
at Ice.IceDataContext.Release[TEntity](TEntity& entity) in C:\_Releases\ICE\ICE3.2.400.22\Source\Framework\Epicor.System\Data\IceDataContext.cs:line 277
at Erp.Internal.Lib.OrderRelWrite.Write_OrderRel(OrderRel NewOrderRel, OrderRel OldOrderRel) in C:\_Releases\ERP\UD10.2.400.22\Source\Server\Internal\Lib\OrderRelShared\OrderRelWrite\OrderRelWrite.i.cs:line 1241
at Erp.Triggers.OrderRel.WriteTrigger.Write(OrderRel OrderRel, OrderRel OldOrderRel) in C:\_Releases\ERP\ERP10.2.400.0\Source\Server\Db\Triggers\OrderRel\write.cs:line 210
at Ice.DataTrigger`2.Ice.ILinqTrigger.Write(LinqRow newRecord, LinqRow oldRecord) in C:\_Releases\ICE\ICE3.2.400.22\Source\Framework\Epicor.Ice\Triggers\TriggerBase.cs:line 22
at Ice.Triggers.TriggerQueue.ExecuteWriteTrigger(IceDataContext context, LinqRow modifiedRecord, LinqRow originalRecord) in C:\_Releases\ICE\ICE3.2.400.22\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 303
at Ice.Triggers.TriggerQueue.RunWriteTriggerInNewLevel(IceDataContext context, LinqRow modifiedRecord, LinqRow originalRecord, Boolean forAddedRow) in C:\_Releases\ICE\ICE3.2.400.22\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 164
at Ice.Triggers.TriggerQueue.<>c__DisplayClass11_0.<RunWriteTrigger>b__1() in C:\_Releases\ICE\ICE3.2.400.22\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 155
at Ice.Triggers.TriggerQueue.RunAtNewLevel(Func`1 buildTriggerRunState, Action action) in C:\_Releases\ICE\ICE3.2.400.22\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 508
at Ice.Triggers.TriggerQueue.RunTriggers(IceDataContext context) in C:\_Releases\ICE\ICE3.2.400.22\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 90
at Ice.IceDataContext.RunUntilAllTriggersHaveExecuted() in C:\_Releases\ICE\ICE3.2.400.22\Source\Framework\Epicor.System\Data\IceDataContext.cs:line 580
at Ice.Triggers.TriggerQueue.RunAtNewLevel(Func`1 buildTriggerRunState, Action action) in C:\_Releases\ICE\ICE3.2.400.22\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 508
at Ice.IceDataContext.Validate[TLinqRow](TLinqRow row) in C:\_Releases\ICE\ICE3.2.400.22\Source\Framework\Epicor.System\Data\IceDataContext.cs:line 337
at Ice.IceDataContext.Release[TEntity](TEntity& entity) in C:\_Releases\ICE\ICE3.2.400.22\Source\Framework\Epicor.System\Data\IceDataContext.cs:line 277
at Erp.Services.BO.SalesOrderSvc.CloseRelease(Int32 iOrderNum, Int32 iOrderLine, Int32 iOrderRelNum) in C:\_Releases\ERP\UD10.2.400.22\Source\Server\Services\BO\SalesOrder\SalesOrder.cs:line 13173
at Erp.Services.BO.SalesOrderSvcFacade.CloseRelease(Int32 iOrderNum, Int32 iOrderLine, Int32 iOrderRelNum) in C:\_Releases\ERP\UD10.2.400.22\Source\Server\Services\BO\SalesOrder\SalesOrderSvcFacade.cs:line 4680
at SyncInvokeCloseRelease(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at Epicor.Hosting.OperationBoundInvoker.InnerInvoke(Object instance, Func`2 func) in C:\_Releases\ICE\ICE3.2.400.22\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 59
at Epicor.Hosting.OperationBoundInvoker.Invoke(Object instance, Func`2 func) in C:\_Releases\ICE\ICE3.2.400.22\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 28
Epicor is telling us that it is the size of the Sales Order that is causing the issue, stating that 87 lines with a over 9,500 Releases is too much for Epicor to handle. Personally, I find that hard to believe. Blanket orders exist for a reason, and Epicor not being able to handle one seems a tad far-fetched.
Is anyone here able to point me in the right direction to figure out why it is taking over 3 minutes to change a release from Open to Closed for this Sales Order?
No, this does not happen on smaller Sales orders. Just the handful of really big ones we have.