CRM 2011 Plugin Registration Error: Assembly must be registered in isolation
-
Wednesday, June 20, 2012 6:49 PM
Everything I've read (and I've read about 30 blogs on this same error) says you must be a Deployment Administrator using the CRM Deployment Manager tool to register a plugin, as well as having a System Administrator role in CRM. I have both. Still getting the error. I even tried registering the plugin using credentials from another Deployment Administrator. Same error.
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Action failed for assembly 'CreatingOpp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bd6d9ce5d8ab26bd': Assembly must be registered in isolation.
Detail: <OrganizationServiceFault xmlns="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<ErrorCode>-2147220906</ErrorCode>
<ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>Action failed for assembly 'CreatingOpp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bd6d9ce5d8ab26bd': Assembly must be registered in isolation.</Message>
<Timestamp>2012-06-20T18:41:49.6945239Z</Timestamp>
<InnerFault>
<ErrorCode>-2147220906</ErrorCode>
<ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>Action failed for assembly 'CreatingOpp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bd6d9ce5d8ab26bd': Assembly must be registered in isolation.</Message>
<Timestamp>2012-06-20T18:41:49.6945239Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText i:nil="true" />
</InnerFault>
<TraceText i:nil="true" />
</OrganizationServiceFault>
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
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 Microsoft.Xrm.Sdk.IOrganizationService.Update(Entity entity)
at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.UpdateCore(Entity entity)
at PluginRegistrationTool.RegistrationHelper.UpdateAssembly(CrmOrganization org, String pathToAssembly, CrmPluginAssembly assembly, PluginType[] type) in C:\Program Files (x86)\Microsoft Dynamics CRM\SDK\tools\pluginregistration\RegistrationHelper.cs:line 263
at PluginRegistrationTool.PluginRegistrationForm.btnRegister_Click(Object sender, EventArgs e) in C:\Program Files (x86)\Microsoft Dynamics CRM\SDK\tools\pluginregistration\PluginRegistrationForm.cs:line 382
All Replies
-
Wednesday, June 20, 2012 6:56 PMIf u have already registered that assembly and u r trying to update that assembly, then try unregistering the already existing assembly and then deploy ur plugin.
-
Wednesday, June 20, 2012 7:38 PM
Good idea, but same error when I try to un-register it:
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Action failed for assembly 'CreatingOpp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bd6d9ce5d8ab26bd': Assembly must be registered in isolation.
Detail: <OrganizationServiceFault xmlns="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<ErrorCode>-2147220906</ErrorCode>
<ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>Action failed for assembly 'CreatingOpp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bd6d9ce5d8ab26bd': Assembly must be registered in isolation.</Message>
<Timestamp>2012-06-20T19:38:09.0505863Z</Timestamp>
<InnerFault>
<ErrorCode>-2147220906</ErrorCode>
<ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>Action failed for assembly 'CreatingOpp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bd6d9ce5d8ab26bd': Assembly must be registered in isolation.</Message>
<Timestamp>2012-06-20T19:38:09.0505863Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText i:nil="true" />
</InnerFault>
<TraceText i:nil="true" />
</OrganizationServiceFault>
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
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 Microsoft.Xrm.Sdk.IOrganizationService.Delete(String entityName, Guid id)
at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.DeleteCore(String entityName, Guid id)
at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.Delete(String entityName, Guid id)
at PluginRegistrationTool.RegistrationHelper.Unregister(CrmOrganization org, ProgressIndicator prog, ICrmEntity[] crmEntity) in C:\Program Files (x86)\Microsoft Dynamics CRM\SDK\tools\pluginregistration\RegistrationHelper.cs:line 885
at PluginRegistrationTool.OrganizationControl.toolUnregister_Click(Object sender, EventArgs e) in C:\Program Files (x86)\Microsoft Dynamics CRM\SDK\tools\pluginregistration\OrganizationControl.cs:line 287 -
Thursday, June 21, 2012 12:05 AM
Hello -
Can you turn on server tracing and post the server exception stack?Thanks,
Brandon
-
Thursday, June 21, 2012 8:44 AM
Hi
Your user must have deployment rights.
Go to deployment manager and add your user there.
Regards Karan Mittal
- Proposed As Answer by Scott DurowMicrosoft Community Contributor, Editor Thursday, June 21, 2012 8:49 AM
-
Friday, June 22, 2012 4:10 PM
Karan - As I stated, I do have Deployment Admin rights in the Deploymnet Manager and System Admin rights in CRM. I have tried to register the plugin using another user's credentials who is also a Deployment Admin and System Admin, with the same result.
BSimons - Here's the server trace file (next two posts):
# CRM Tracing Version 2.0
# LocalTime: 2012-06-22 09:53:43.811
# Categories: *:Verbose
# CallStackOn: Yes
# ComputerName: SVCRMBES01
# CRMVersion: 5.0.9690.2243
# DeploymentType: OnPremise
# ScaleGroup:
# ServerRole: AsyncService, DeploymentService, SandboxServer, DeploymentManagementTools
[2012-06-22 09:53:43.811] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 24 |Category: Shared |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | CrmDbConnection.Open
at CrmDbConnection.Open()
at DataAccessBase.ExecuteSqlCommandAndProcessRecords(IDbCommand command, RecordProcessor recordProcessor)
at QueueDataAccess.SelectEvents(Int32 numberOfEvents)
at QueueManager.OnSelectPerOrganization(IOrganizationConfiguration orgConfig, Int32 orgCapacity)
at WorkloadThrottler.HandleIdleOrganization(WorkloadThrottlingInformation orgPollingInfo, Int32 effectiveMinimumPriority)
at <>c__DisplayClass32`2.<PartitionerForEachWorker>b__30()
at Task.InnerInvokeWithArg(Task childTask)
at <>c__DisplayClass7.<ExecuteSelfReplicating>b__6(Object )
at Task.Execute()
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued)
at TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued, Object threadStatics)
at Task.InternalRunSynchronously(TaskScheduler scheduler)
at Parallel.PartitionerForEachWorker(Partitioner`1 source, ParallelOptions parallelOptions, Action`1 simpleBody, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at Parallel.ForEachWorker(IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at Parallel.ForEach(IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body)
at WorkloadThrottler.Execute(Int32 totalCapacity, CancellationToken cancellationToken)
at QueueManager.OnSelectTimerEvent(Object sender, ElapsedEventArgs e)
at Timer.InvokeElapsedWithCancellationToken(Object state)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at ThreadPoolWorkQueue.Dispatch()
at _ThreadPoolWaitCallback.PerformWaitCallback()
>ConnectionString: Workstation ID=SVCRMBES01.CrmAsyncService;Data Source=CRMSQLCLS\CRMSQLCLS;Initial Catalog=Default_MSCRM;Integrated Security=True;Min Pool Size=2;Connect Timeout=150;Application Name=MSCRMAsyncService
[2012-06-22 09:53:43.889] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 24 |Category: Platform.Sql |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | CrmDbConnection.InternalExecuteReader
at CrmDbConnection.InternalExecuteReader(IDbCommand command, Boolean capturePerfTrace)
at CrmDbConnection.ExecuteReader(IDbCommand command, Boolean impersonate, Boolean capturePerfTrace)
at DataAccessBase.ExecuteSqlCommandAndProcessRecords(IDbCommand command, RecordProcessor recordProcessor)
at QueueDataAccess.SelectEvents(Int32 numberOfEvents)
at QueueManager.OnSelectPerOrganization(IOrganizationConfiguration orgConfig, Int32 orgCapacity)
at WorkloadThrottler.HandleIdleOrganization(WorkloadThrottlingInformation orgPollingInfo, Int32 effectiveMinimumPriority)
at <>c__DisplayClass32`2.<PartitionerForEachWorker>b__30()
at Task.InnerInvokeWithArg(Task childTask)
at <>c__DisplayClass7.<ExecuteSelfReplicating>b__6(Object )
at Task.Execute()
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued)
at TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued, Object threadStatics)
at Task.InternalRunSynchronously(TaskScheduler scheduler)
at Parallel.PartitionerForEachWorker(Partitioner`1 source, ParallelOptions parallelOptions, Action`1 simpleBody, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at Parallel.ForEachWorker(IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at Parallel.ForEach(IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body)
at WorkloadThrottler.Execute(Int32 totalCapacity, CancellationToken cancellationToken)
at QueueManager.OnSelectTimerEvent(Object sender, ElapsedEventArgs e)
at Timer.InvokeElapsedWithCancellationToken(Object state)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at ThreadPoolWorkQueue.Dispatch()
at _ThreadPoolWaitCallback.PerformWaitCallback()
>
SET DEADLOCK_PRIORITY LOW
BEGIN TRANSACTION
DECLARE @res INT
EXEC @res = sp_getapplock
@Resource = 'AsyncService_app_lock',
@LockMode = 'Exclusive'
IF @res NOT IN (0, 1)
BEGIN
RAISERROR ( 'Unable to acquire App Lock', 16, 1 )
END
ELSE
BEGIN
update AsyncOperationBase
set
HostId = 'SVCRMBES01.MSCRMAsyncService.aa196336-2451-4537-8188-9cd9dbbd80d8',
StateCode = 2,
StatusCode = 20,
StartedOn = '06/22/2012 15:53:43',
ModifiedOn = '06/22/2012 15:53:43',
ModifiedBy = CreatedBy,
RetryCount = case coalesce(ErrorCode, 0)
when 0 then coalesce(RetryCount, 0)
else coalesce(RetryCount, 0)+1
end
output
INSERTED.AsyncOperationId,
INSERTED.OperationType,
INSERTED.Data,
INSERTED.DependencyToken,
INSERTED.RegardingObjectId,
INSERTED.RegardingObjectIdName,
INSERTED.RegardingObjectTypeCode,
INSERTED.OwningBusinessUnit,
INSERTED.OwningExtensionId,
INSERTED.OwningExtensionIdName,
INSERTED.OwningExtensionTypeCode,
INSERTED.OwnerId,
INSERTED.RetryCount,
INSERTED.MessageName,
INSERTED.RecurrencePattern,
INSERTED.RecurrenceStartTime,
INSERTED.CorrelationId,
INSERTED.CorrelationUpdatedTime,
INSERTED.Depth,
INSERTED.PrimaryEntityType,
INSERTED.RequestId,
INSERTED.CreatedOn,
INSERTED.ExecutionTimeSpan
where
AsyncOperationId in
(select top(1) AsyncOperationId from AsyncOperationBase WITH (READPAST, READCOMMITTEDLOCK, UPDLOCK)
where StateCode = 0
and OperationType IS NOT null
order by Sequence asc)
EXEC @res = sp_releaseapplock
@Resource = 'AsyncService_app_lock'
END
COMMIT
[2012-06-22 09:53:43.889] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 24 |Category: Platform.Sql |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | CrmDbConnection.InternalExecuteReader
at CrmDbConnection.InternalExecuteReader(IDbCommand command, Boolean capturePerfTrace)
at CrmDbConnection.ExecuteReader(IDbCommand command, Boolean impersonate, Boolean capturePerfTrace)
at DataAccessBase.ExecuteSqlCommandAndProcessRecords(IDbCommand command, RecordProcessor recordProcessor)
at QueueDataAccess.SelectEvents(Int32 numberOfEvents)
at QueueManager.OnSelectPerOrganization(IOrganizationConfiguration orgConfig, Int32 orgCapacity)
at WorkloadThrottler.HandleIdleOrganization(WorkloadThrottlingInformation orgPollingInfo, Int32 effectiveMinimumPriority)
at <>c__DisplayClass32`2.<PartitionerForEachWorker>b__30()
at Task.InnerInvokeWithArg(Task childTask)
at <>c__DisplayClass7.<ExecuteSelfReplicating>b__6(Object )
at Task.Execute()
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued)
at TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued, Object threadStatics)
at Task.InternalRunSynchronously(TaskScheduler scheduler)
at Parallel.PartitionerForEachWorker(Partitioner`1 source, ParallelOptions parallelOptions, Action`1 simpleBody, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at Parallel.ForEachWorker(IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at Parallel.ForEach(IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body)
at WorkloadThrottler.Execute(Int32 totalCapacity, CancellationToken cancellationToken)
at QueueManager.OnSelectTimerEvent(Object sender, ElapsedEventArgs e)
at Timer.InvokeElapsedWithCancellationToken(Object state)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at ThreadPoolWorkQueue.Dispatch()
at _ThreadPoolWaitCallback.PerformWaitCallback()
>Query execution time: 0.0 seconds; database: Default_MSCRM; command:
SET DEADLOCK_PRIORITY LOW
BEGIN TRANSACTION
DECLARE @res INT
EXEC @res = sp_getapplock
@Resource = 'AsyncService_app_lock',
@LockMode = 'Exclusive'
IF @res NOT IN (0, 1)
BEGIN
RAISERROR ( 'Unable to acquire App Lock', 16, 1 )
END
ELSE
BEGIN
update AsyncOperationBase
set
HostId = 'SVCRMBES01.MSCRMAsyncService.aa196336-2451-4537-8188-9cd9dbbd80d8',
StateCode = 2,
StatusCode = 20,
StartedOn = '06/22/2012 15:53:43',
ModifiedOn = '06/22/2012 15:53:43',
ModifiedBy = CreatedBy,
RetryCount = case coalesce(ErrorCode, 0)
when 0 then coalesce(RetryCount, 0)
else coalesce(RetryCount, 0)+1
end
output
INSERTED.AsyncOperationId,
INSERTED.OperationType,
INSERTED.Data,
INSERTED.DependencyToken,
INSERTED.RegardingObjectId,
INSERTED.RegardingObjectIdName,
INSERTED.RegardingObjectTypeCode,
INSERTED.OwningBusinessUnit,
INSERTED.OwningExtensionId,
INSERTED.OwningExtensionIdName,
INSERTED.OwningExtensionTypeCode,
INSERTED.OwnerId,
INSERTED.RetryCount,
INSERTED.MessageName,
INSERTED.RecurrencePattern,
INSERTED.RecurrenceStartTime,
INSERTED.CorrelationId,
INSERTED.CorrelationUpdatedTime,
INSERTED.Depth,
INSERTED.PrimaryEntityType,
INSERTED.RequestId,
INSERTED.CreatedOn,
INSERTED.ExecutionTimeSpan
where
AsyncOperationId in
(select top(1) AsyncOperationId from AsyncOperationBase WITH (READPAST, READCOMMITTEDLOCK, UPDLOCK)
where StateCode = 0
and OperationType IS NOT null
order by Sequence asc)
EXEC @res = sp_releaseapplock
@Resource = 'AsyncService_app_lock'
END
COMMIT.
[2012-06-22 09:53:43.889] Process:CrmAsyncService |Organization:f28d3c72-39b6-e111-baff-0050568c3d26 |Thread: 24 |Category: Platform.Async |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | QueueManager.OnSelectPerOrganization
at QueueManager.OnSelectPerOrganization(IOrganizationConfiguration orgConfig, Int32 orgCapacity)
at WorkloadThrottler.HandleIdleOrganization(WorkloadThrottlingInformation orgPollingInfo, Int32 effectiveMinimumPriority)
at <>c__DisplayClass32`2.<PartitionerForEachWorker>b__30()
at Task.InnerInvokeWithArg(Task childTask)
at <>c__DisplayClass7.<ExecuteSelfReplicating>b__6(Object )
at Task.Execute()
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued)
at TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued, Object threadStatics)
at Task.InternalRunSynchronously(TaskScheduler scheduler)
at Parallel.PartitionerForEachWorker(Partitioner`1 source, ParallelOptions parallelOptions, Action`1 simpleBody, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at Parallel.ForEachWorker(IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at Parallel.ForEach(IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body)
at WorkloadThrottler.Execute(Int32 totalCapacity, CancellationToken cancellationToken)
at QueueManager.OnSelectTimerEvent(Object sender, ElapsedEventArgs e)
at Timer.InvokeElapsedWithCancellationToken(Object state)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at ThreadPoolWorkQueue.Dispatch()
at _ThreadPoolWaitCallback.PerformWaitCallback()
>SVCRMBES01.MSCRMAsyncService.aa196336-2451-4537-8188-9cd9dbbd80d8: Selecting up to 1 operations - 0 selected.
[2012-06-22 09:53:43.889] Process:CrmAsyncService |Organization:f28d3c72-39b6-e111-baff-0050568c3d26 |Thread: 24 |Category: Platform.Async |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | WorkloadThrottler.TraceWorkloadThrottlingInformation
at WorkloadThrottler.TraceWorkloadThrottlingInformation(Guid organizationId, Int32 priority, Int32 waitIteration, Int32 orgCapacity, Int32 actualWorkDone)
at WorkloadThrottler.HandleIdleOrganization(WorkloadThrottlingInformation orgPollingInfo, Int32 effectiveMinimumPriority)
at <>c__DisplayClass32`2.<PartitionerForEachWorker>b__30()
at Task.InnerInvokeWithArg(Task childTask)
at <>c__DisplayClass7.<ExecuteSelfReplicating>b__6(Object )
at Task.Execute()
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued)
at TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued, Object threadStatics)
at Task.InternalRunSynchronously(TaskScheduler scheduler)
at Parallel.PartitionerForEachWorker(Partitioner`1 source, ParallelOptions parallelOptions, Action`1 simpleBody, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at Parallel.ForEachWorker(IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at Parallel.ForEach(IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body)
at WorkloadThrottler.Execute(Int32 totalCapacity, CancellationToken cancellationToken)
at QueueManager.OnSelectTimerEvent(Object sender, ElapsedEventArgs e)
at Timer.InvokeElapsedWithCancellationToken(Object state)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at ThreadPoolWorkQueue.Dispatch()
at _ThreadPoolWaitCallback.PerformWaitCallback()
>WorkloadThrottlingInformation: SVCRMBES01.MSCRMAsyncService.aa196336-2451-4537-8188-9cd9dbbd80d8_OnSelect, {F28D3C72-39B6-E111-BAFF-0050568C3D26}, -50, 0, 0, 0
[2012-06-22 09:53:48.304] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 30 |Category: Shared |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | CrmDbConnection.Open
at CrmDbConnection.Open()
at DataAccessSharedBase.ExecuteSqlCommand(IDbCommand command, Nullable`1 expectedAffectedRecords)
at QueueDataAccess.MoveSuspendedToReady()
at <>c__DisplayClassf.<OnMoveSuspendedToReadyTimerEvent>b__e(IQueueDataAccess queueDataAccess, IOrganizationConfiguration orgConfig)
at QueueManager.ExecuteForAllOrganizations(OrganizationQueueDataAccessHandler handler)
at Timer.InvokeElapsedWithCancellationToken(Object state)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at ThreadPoolWorkQueue.Dispatch()
at _ThreadPoolWaitCallback.PerformWaitCallback()
>ConnectionString: Workstation ID=SVCRMBES01.CrmAsyncService;Data Source=CRMSQLCLS\CRMSQLCLS;Initial Catalog=YourCompany_MSCRM;Integrated Security=True;Min Pool Size=2;Connect Timeout=150;Application Name=MSCRMAsyncService
[2012-06-22 09:53:48.304] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 30 |Category: Platform.Sql |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | CrmDbConnection.ExecuteNonQuery
at CrmDbConnection.ExecuteNonQuery(IDbCommand command, Boolean impersonate, Boolean capturePerfTrace)
at DataAccessSharedBase.ExecuteSqlCommand(IDbCommand command, Nullable`1 expectedAffectedRecords)
at QueueDataAccess.MoveSuspendedToReady()
at <>c__DisplayClassf.<OnMoveSuspendedToReadyTimerEvent>b__e(IQueueDataAccess queueDataAccess, IOrganizationConfiguration orgConfig)
at QueueManager.ExecuteForAllOrganizations(OrganizationQueueDataAccessHandler handler)
at Timer.InvokeElapsedWithCancellationToken(Object state)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at ThreadPoolWorkQueue.Dispatch()
at _ThreadPoolWaitCallback.PerformWaitCallback()
>
SET DEADLOCK_PRIORITY LOW
BEGIN TRANSACTION
DECLARE @res INT
EXEC @res = sp_getapplock
@Resource = 'AsyncService_app_lock',
@LockMode = 'Exclusive'
IF @res NOT IN (0, 1)
BEGIN
RAISERROR ( 'Unable to acquire App Lock', 16, 1 )
END
ELSE
BEGIN
With TopSuspendedAsyncOperations(AsyncOperationId)
AS
(
Select Top(2000) AsyncOperationId
from AsyncOperationBase o1
where
StateCode = 1
and ((PostponeUntil is NULL) or (PostponeUntil <= '06/22/2012 15:53:48'))
and ((DependencyToken is NULL) or (not exists (
select AsyncOperationId
from AsyncOperationBase o2
where
o2.Sequence < o1.Sequence
and o2.DependencyToken = o1.DependencyToken
and o2.RecurrencePattern is null
and o2.StateCode in (0,2,1))))
)
update AsyncOperationBase
set
StateCode = 0,
StatusCode = 0,
ModifiedOn = '06/22/2012 15:53:48',
ModifiedBy = CreatedBy
From AsyncOperationBase join TopSuspendedAsyncOperations on
AsyncOperationBase.AsyncOperationId = TopSuspendedAsyncOperations.AsyncOperationId
EXEC @res = sp_releaseapplock
@Resource = 'AsyncService_app_lock'
END
COMMIT
[2012-06-22 09:53:48.304] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 30 |Category: Platform.Sql |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | CrmDbConnection.InternalExecuteNonQuery
at CrmDbConnection.InternalExecuteNonQuery(IDbCommand command, Boolean capturePerfTrace)
at CrmDbConnection.ExecuteNonQuery(IDbCommand command, Boolean impersonate, Boolean capturePerfTrace)
at DataAccessSharedBase.ExecuteSqlCommand(IDbCommand command, Nullable`1 expectedAffectedRecords)
at QueueDataAccess.MoveSuspendedToReady()
at <>c__DisplayClassf.<OnMoveSuspendedToReadyTimerEvent>b__e(IQueueDataAccess queueDataAccess, IOrganizationConfiguration orgConfig)
at QueueManager.ExecuteForAllOrganizations(OrganizationQueueDataAccessHandler handler)
at Timer.InvokeElapsedWithCancellationToken(Object state)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at ThreadPoolWorkQueue.Dispatch()
at _ThreadPoolWaitCallback.PerformWaitCallback()
>Query execution time: 0.0 seconds; database: YourCompany_MSCRM; command:
SET DEADLOCK_PRIORITY LOW
BEGIN TRANSACTION
DECLARE @res INT
EXEC @res = sp_getapplock
@Resource = 'AsyncService_app_lock',
@LockMode = 'Exclusive'
IF @res NOT IN (0, 1)
BEGIN
RAISERROR ( 'Unable to acquire App Lock', 16, 1 )
END
ELSE
BEGIN
With TopSuspendedAsyncOperations(AsyncOperationId)
AS
(
Select Top(2000) AsyncOperationId
from AsyncOperationBase o1
where
StateCode = 1
and ((PostponeUntil is NULL) or (PostponeUntil <= '06/22/2012 15:53:48'))
and ((DependencyToken is NULL) or (not exists (
select AsyncOperationId
from AsyncOperationBase o2
where
o2.Sequence < o1.Sequence
and o2.DependencyToken = o1.DependencyToken
and o2.RecurrencePattern is null
and o2.StateCode in (0,2,1))))
)
update AsyncOperationBase
set
StateCode = 0,
StatusCode = 0,
ModifiedOn = '06/22/2012 15:53:48',
ModifiedBy = CreatedBy
From AsyncOperationBase join TopSuspendedAsyncOperations on
AsyncOperationBase.AsyncOperationId = TopSuspendedAsyncOperations.AsyncOperationId
EXEC @res = sp_releaseapplock
@Resource = 'AsyncService_app_lock'
END
COMMIT.
[2012-06-22 09:53:48.304] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 30 |Category: Shared |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | CrmDbConnection.Open
at CrmDbConnection.Open()
at DataAccessSharedBase.ExecuteSqlCommand(IDbCommand command, Nullable`1 expectedAffectedRecords)
at QueueDataAccess.MoveSuspendedToReady()
at <>c__DisplayClassf.<OnMoveSuspendedToReadyTimerEvent>b__e(IQueueDataAccess queueDataAccess, IOrganizationConfiguration orgConfig)
at QueueManager.ExecuteForAllOrganizations(OrganizationQueueDataAccessHandler handler)
at Timer.InvokeElapsedWithCancellationToken(Object state)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at ThreadPoolWorkQueue.Dispatch()
at _ThreadPoolWaitCallback.PerformWaitCallback()
>ConnectionString: Workstation ID=SVCRMBES01.CrmAsyncService;Data Source=CRMSQLCLS\CRMSQLCLS;Initial Catalog=Default_MSCRM;Integrated Security=True;Min Pool Size=2;Connect Timeout=150;Application Name=MSCRMAsyncService
[2012-06-22 09:53:48.304] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 30 |Category: Platform.Sql |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | CrmDbConnection.ExecuteNonQuery
at CrmDbConnection.ExecuteNonQuery(IDbCommand command, Boolean impersonate, Boolean capturePerfTrace)
at DataAccessSharedBase.ExecuteSqlCommand(IDbCommand command, Nullable`1 expectedAffectedRecords)
at QueueDataAccess.MoveSuspendedToReady()
at <>c__DisplayClassf.<OnMoveSuspendedToReadyTimerEvent>b__e(IQueueDataAccess queueDataAccess, IOrganizationConfiguration orgConfig)
at QueueManager.ExecuteForAllOrganizations(OrganizationQueueDataAccessHandler handler)
at Timer.InvokeElapsedWithCancellationToken(Object state)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at ThreadPoolWorkQueue.Dispatch()
at _ThreadPoolWaitCallback.PerformWaitCallback()
>
SET DEADLOCK_PRIORITY LOW
BEGIN TRANSACTION
DECLARE @res INT
EXEC @res = sp_getapplock
@Resource = 'AsyncService_app_lock',
@LockMode = 'Exclusive'
IF @res NOT IN (0, 1)
BEGIN
RAISERROR ( 'Unable to acquire App Lock', 16, 1 )
END
ELSE
BEGIN
With TopSuspendedAsyncOperations(AsyncOperationId)
AS
(
Select Top(2000) AsyncOperationId
from AsyncOperationBase o1
where
StateCode = 1
and ((PostponeUntil is NULL) or (PostponeUntil <= '06/22/2012 15:53:48'))
and ((DependencyToken is NULL) or (not exists (
select AsyncOperationId
from AsyncOperationBase o2
where
o2.Sequence < o1.Sequence
and o2.DependencyToken = o1.DependencyToken
and o2.RecurrencePattern is null
and o2.StateCode in (0,2,1))))
)
update AsyncOperationBase
set
StateCode = 0,
StatusCode = 0,
ModifiedOn = '06/22/2012 15:53:48',
ModifiedBy = CreatedBy
From AsyncOperationBase join TopSuspendedAsyncOperations on
AsyncOperationBase.AsyncOperationId = TopSuspendedAsyncOperations.AsyncOperationId
EXEC @res = sp_releaseapplock
@Resource = 'AsyncService_app_lock'
END
COMMIT
[2012-06-22 09:53:48.319] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 30 |Category: Platform.Sql |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | CrmDbConnection.InternalExecuteNonQuery
at CrmDbConnection.InternalExecuteNonQuery(IDbCommand command, Boolean capturePerfTrace)
at CrmDbConnection.ExecuteNonQuery(IDbCommand command, Boolean impersonate, Boolean capturePerfTrace)
at DataAccessSharedBase.ExecuteSqlCommand(IDbCommand command, Nullable`1 expectedAffectedRecords)
at QueueDataAccess.MoveSuspendedToReady()
at <>c__DisplayClassf.<OnMoveSuspendedToReadyTimerEvent>b__e(IQueueDataAccess queueDataAccess, IOrganizationConfiguration orgConfig)
at QueueManager.ExecuteForAllOrganizations(OrganizationQueueDataAccessHandler handler)
at Timer.InvokeElapsedWithCancellationToken(Object state)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at ThreadPoolWorkQueue.Dispatch()
at _ThreadPoolWaitCallback.PerformWaitCallback()
>Query execution time: 0.0 seconds; database: Default_MSCRM; command:
SET DEADLOCK_PRIORITY LOW
BEGIN TRANSACTION
DECLARE @res INT
EXEC @res = sp_getapplock
@Resource = 'AsyncService_app_lock',
@LockMode = 'Exclusive'
IF @res NOT IN (0, 1)
BEGIN
RAISERROR ( 'Unable to acquire App Lock', 16, 1 )
END
ELSE
BEGIN
With TopSuspendedAsyncOperations(AsyncOperationId)
AS
(
Select Top(2000) AsyncOperationId
from AsyncOperationBase o1
where
StateCode = 1
and ((PostponeUntil is NULL) or (PostponeUntil <= '06/22/2012 15:53:48'))
and ((DependencyToken is NULL) or (not exists (
select AsyncOperationId
from AsyncOperationBase o2
where
o2.Sequence < o1.Sequence
and o2.DependencyToken = o1.DependencyToken
and o2.RecurrencePattern is null
and o2.StateCode in (0,2,1))))
)
update AsyncOperationBase
set
StateCode = 0,
StatusCode = 0,
ModifiedOn = '06/22/2012 15:53:48',
ModifiedBy = CreatedBy
From AsyncOperationBase join TopSuspendedAsyncOperations on
AsyncOperationBase.AsyncOperationId = TopSuspendedAsyncOperations.AsyncOperationId
EXEC @res = sp_releaseapplock
@Resource = 'AsyncService_app_lock'
END
COMMIT.
[2012-06-22 09:53:48.818] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 15 |Category: Shared |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | CrmDbConnection.Open
at CrmDbConnection.Open()
at DataAccessBase.ExecuteSqlCommandAndProcessRecords(IDbCommand command, RecordProcessor recordProcessor)
at QueueDataAccess.SelectEvents(Int32 numberOfEvents)
at QueueManager.OnSelectPerOrganization(IOrganizationConfiguration orgConfig, Int32 orgCapacity)
at WorkloadThrottler.HandleIdleOrganization(WorkloadThrottlingInformation orgPollingInfo, Int32 effectiveMinimumPriority)
at <>c__DisplayClass32`2.<PartitionerForEachWorker>b__30()
at Task.InnerInvokeWithArg(Task childTask)
at <>c__DisplayClass7.<ExecuteSelfReplicating>b__6(Object )
at Task.Execute()
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued)
at TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued, Object threadStatics)
at Task.InternalRunSynchronously(TaskScheduler scheduler)
at Parallel.PartitionerForEachWorker(Partitioner`1 source, ParallelOptions parallelOptions, Action`1 simpleBody, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at Parallel.ForEachWorker(IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at Parallel.ForEach(IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body)
at WorkloadThrottler.Execute(Int32 totalCapacity, CancellationToken cancellationToken)
at QueueManager.OnSelectTimerEvent(Object sender, ElapsedEventArgs e)
at Timer.InvokeElapsedWithCancellationToken(Object state)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at ThreadPoolWorkQueue.Dispatch()
at _ThreadPoolWaitCallback.PerformWaitCallback()
>ConnectionString: Workstation ID=SVCRMBES01.CrmAsyncService;Data Source=CRMSQLCLS\CRMSQLCLS;Initial Catalog=YourCompany_MSCRM;Integrated Security=True;Min Pool Size=2;Connect Timeout=150;Application Name=MSCRMAsyncService
[2012-06-22 09:53:48.818] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 15 |Category: Platform.Sql |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | CrmDbConnection.InternalExecuteReader
at CrmDbConnection.InternalExecuteReader(IDbCommand command, Boolean capturePerfTrace)
at CrmDbConnection.ExecuteReader(IDbCommand command, Boolean impersonate, Boolean capturePerfTrace)
at DataAccessBase.ExecuteSqlCommandAndProcessRecords(IDbCommand command, RecordProcessor recordProcessor)
at QueueDataAccess.SelectEvents(Int32 numberOfEvents)
at QueueManager.OnSelectPerOrganization(IOrganizationConfiguration orgConfig, Int32 orgCapacity)
at WorkloadThrottler.HandleIdleOrganization(WorkloadThrottlingInformation orgPollingInfo, Int32 effectiveMinimumPriority)
at <>c__DisplayClass32`2.<PartitionerForEachWorker>b__30()
at Task.InnerInvokeWithArg(Task childTask)
at <>c__DisplayClass7.<ExecuteSelfReplicating>b__6(Object )
at Task.Execute()
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued)
at TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued, Object threadStatics)
at Task.InternalRunSynchronously(TaskScheduler scheduler)
at Parallel.PartitionerForEachWorker(Partitioner`1 source, ParallelOptions parallelOptions, Action`1 simpleBody, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at Parallel.ForEachWorker(IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at Parallel.ForEach(IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body)
at WorkloadThrottler.Execute(Int32 totalCapacity, CancellationToken cancellationToken)
at QueueManager.OnSelectTimerEvent(Object sender, ElapsedEventArgs e)
at Timer.InvokeElapsedWithCancellationToken(Object state)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at ThreadPoolWorkQueue.Dispatch()
at _ThreadPoolWaitCallback.PerformWaitCallback()
>
SET DEADLOCK_PRIORITY LOW
BEGIN TRANSACTION
DECLARE @res INT
EXEC @res = sp_getapplock
@Resource = 'AsyncService_app_lock',
@LockMode = 'Exclusive'
IF @res NOT IN (0, 1)
BEGIN
RAISERROR ( 'Unable to acquire App Lock', 16, 1 )
END
ELSE
BEGIN
update AsyncOperationBase
set
HostId = 'SVCRMBES01.MSCRMAsyncService.aa196336-2451-4537-8188-9cd9dbbd80d8',
StateCode = 2,
StatusCode = 20,
StartedOn = '06/22/2012 15:53:48',
ModifiedOn = '06/22/2012 15:53:48',
ModifiedBy = CreatedBy,
RetryCount = case coalesce(ErrorCode, 0)
when 0 then coalesce(RetryCount, 0)
else coalesce(RetryCount, 0)+1
end
output
INSERTED.AsyncOperationId,
INSERTED.OperationType,
INSERTED.Data,
INSERTED.DependencyToken,
INSERTED.RegardingObjectId,
INSERTED.RegardingObjectIdName,
INSERTED.RegardingObjectTypeCode,
INSERTED.OwningBusinessUnit,
INSERTED.OwningExtensionId,
INSERTED.OwningExtensionIdName,
INSERTED.OwningExtensionTypeCode,
INSERTED.OwnerId,
INSERTED.RetryCount,
INSERTED.MessageName,
INSERTED.RecurrencePattern,
INSERTED.RecurrenceStartTime,
INSERTED.CorrelationId,
INSERTED.CorrelationUpdatedTime,
INSERTED.Depth,
INSERTED.PrimaryEntityType,
INSERTED.RequestId,
INSERTED.CreatedOn,
INSERTED.ExecutionTimeSpan
where
AsyncOperationId in
(select top(1) AsyncOperationId from AsyncOperationBase WITH (READPAST, READCOMMITTEDLOCK, UPDLOCK)
where StateCode = 0
and OperationType IS NOT null
order by Sequence asc)
EXEC @res = sp_releaseapplock
@Resource = 'AsyncService_app_lock'
END
COMMIT -
Friday, June 22, 2012 4:14 PM[2012-06-22 09:53:48.818] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 15 |Category: Platform.Sql |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | CrmDbConnection.InternalExecuteReader
at CrmDbConnection.InternalExecuteReader(IDbCommand command, Boolean capturePerfTrace)
at CrmDbConnection.ExecuteReader(IDbCommand command, Boolean impersonate, Boolean capturePerfTrace)
at DataAccessBase.ExecuteSqlCommandAndProcessRecords(IDbCommand command, RecordProcessor recordProcessor)
at QueueDataAccess.SelectEvents(Int32 numberOfEvents)
at QueueManager.OnSelectPerOrganization(IOrganizationConfiguration orgConfig, Int32 orgCapacity)
at WorkloadThrottler.HandleIdleOrganization(WorkloadThrottlingInformation orgPollingInfo, Int32 effectiveMinimumPriority)
at <>c__DisplayClass32`2.<PartitionerForEachWorker>b__30()
at Task.InnerInvokeWithArg(Task childTask)
at <>c__DisplayClass7.<ExecuteSelfReplicating>b__6(Object )
at Task.Execute()
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued)
at TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued, Object threadStatics)
at Task.InternalRunSynchronously(TaskScheduler scheduler)
at Parallel.PartitionerForEachWorker(Partitioner`1 source, ParallelOptions parallelOptions, Action`1 simpleBody, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at Parallel.ForEachWorker(IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at Parallel.ForEach(IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body)
at WorkloadThrottler.Execute(Int32 totalCapacity, CancellationToken cancellationToken)
at QueueManager.OnSelectTimerEvent(Object sender, ElapsedEventArgs e)
at Timer.InvokeElapsedWithCancellationToken(Object state)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at ThreadPoolWorkQueue.Dispatch()
at _ThreadPoolWaitCallback.PerformWaitCallback()
>Query execution time: 0.0 seconds; database: YourCompany_MSCRM; command:
SET DEADLOCK_PRIORITY LOW
BEGIN TRANSACTION
DECLARE @res INT
EXEC @res = sp_getapplock
@Resource = 'AsyncService_app_lock',
@LockMode = 'Exclusive'
IF @res NOT IN (0, 1)
BEGIN
RAISERROR ( 'Unable to acquire App Lock', 16, 1 )
END
ELSE
BEGIN
update AsyncOperationBase
set
HostId = 'SVCRMBES01.MSCRMAsyncService.aa196336-2451-4537-8188-9cd9dbbd80d8',
StateCode = 2,
StatusCode = 20,
StartedOn = '06/22/2012 15:53:48',
ModifiedOn = '06/22/2012 15:53:48',
ModifiedBy = CreatedBy,
RetryCount = case coalesce(ErrorCode, 0)
when 0 then coalesce(RetryCount, 0)
else coalesce(RetryCount, 0)+1
end
output
INSERTED.AsyncOperationId,
INSERTED.OperationType,
INSERTED.Data,
INSERTED.DependencyToken,
INSERTED.RegardingObjectId,
INSERTED.RegardingObjectIdName,
INSERTED.RegardingObjectTypeCode,
INSERTED.OwningBusinessUnit,
INSERTED.OwningExtensionId,
INSERTED.OwningExtensionIdName,
INSERTED.OwningExtensionTypeCode,
INSERTED.OwnerId,
INSERTED.RetryCount,
INSERTED.MessageName,
INSERTED.RecurrencePattern,
INSERTED.RecurrenceStartTime,
INSERTED.CorrelationId,
INSERTED.CorrelationUpdatedTime,
INSERTED.Depth,
INSERTED.PrimaryEntityType,
INSERTED.RequestId,
INSERTED.CreatedOn,
INSERTED.ExecutionTimeSpan
where
AsyncOperationId in
(select top(1) AsyncOperationId from AsyncOperationBase WITH (READPAST, READCOMMITTEDLOCK, UPDLOCK)
where StateCode = 0
and OperationType IS NOT null
order by Sequence asc)
EXEC @res = sp_releaseapplock
@Resource = 'AsyncService_app_lock'
END
COMMIT.
[2012-06-22 09:53:48.818] Process:CrmAsyncService |Organization:9c294ed4-3d57-e011-ae97-00505685000b |Thread: 15 |Category: Platform.Async |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | QueueManager.OnSelectPerOrganization
at QueueManager.OnSelectPerOrganization(IOrganizationConfiguration orgConfig, Int32 orgCapacity)
at WorkloadThrottler.HandleIdleOrganization(WorkloadThrottlingInformation orgPollingInfo, Int32 effectiveMinimumPriority)
at <>c__DisplayClass32`2.<PartitionerForEachWorker>b__30()
at Task.InnerInvokeWithArg(Task childTask)
at <>c__DisplayClass7.<ExecuteSelfReplicating>b__6(Object )
at Task.Execute()
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued)
at TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued, Object threadStatics)
at Task.InternalRunSynchronously(TaskScheduler scheduler)
at Parallel.PartitionerForEachWorker(Partitioner`1 source, ParallelOptions parallelOptions, Action`1 simpleBody, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at Parallel.ForEachWorker(IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at Parallel.ForEach(IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body)
at WorkloadThrottler.Execute(Int32 totalCapacity, CancellationToken cancellationToken)
at QueueManager.OnSelectTimerEvent(Object sender, ElapsedEventArgs e)
at Timer.InvokeElapsedWithCancellationToken(Object state)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at ThreadPoolWorkQueue.Dispatch()
at _ThreadPoolWaitCallback.PerformWaitCallback()
>SVCRMBES01.MSCRMAsyncService.aa196336-2451-4537-8188-9cd9dbbd80d8: Selecting up to 1 operations - 0 selected.
[2012-06-22 09:53:48.818] Process:CrmAsyncService |Organization:9c294ed4-3d57-e011-ae97-00505685000b |Thread: 15 |Category: Platform.Async |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | WorkloadThrottler.TraceWorkloadThrottlingInformation
at WorkloadThrottler.TraceWorkloadThrottlingInformation(Guid organizationId, Int32 priority, Int32 waitIteration, Int32 orgCapacity, Int32 actualWorkDone)
at WorkloadThrottler.HandleIdleOrganization(WorkloadThrottlingInformation orgPollingInfo, Int32 effectiveMinimumPriority)
at <>c__DisplayClass32`2.<PartitionerForEachWorker>b__30()
at Task.InnerInvokeWithArg(Task childTask)
at <>c__DisplayClass7.<ExecuteSelfReplicating>b__6(Object )
at Task.Execute()
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued)
at TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued, Object threadStatics)
at Task.InternalRunSynchronously(TaskScheduler scheduler)
at Parallel.PartitionerForEachWorker(Partitioner`1 source, ParallelOptions parallelOptions, Action`1 simpleBody, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at Parallel.ForEachWorker(IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at Parallel.ForEach(IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body)
at WorkloadThrottler.Execute(Int32 totalCapacity, CancellationToken cancellationToken)
at QueueManager.OnSelectTimerEvent(Object sender, ElapsedEventArgs e)
at Timer.InvokeElapsedWithCancellationToken(Object state)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at ThreadPoolWorkQueue.Dispatch()
at _ThreadPoolWaitCallback.PerformWaitCallback()
>WorkloadThrottlingInformation: SVCRMBES01.MSCRMAsyncService.aa196336-2451-4537-8188-9cd9dbbd80d8_OnSelect, {9C294ED4-3D57-E011-AE97-00505685000B}, -50, 0, 0, 0
[2012-06-22 09:53:51.221] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 27(MSCRM:-NotificationManager.NotificationWatcherThreadProc) |Category: Shared |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | CrmDbConnection.Open
at CrmDbConnection.Open()
at NotificationService.GetConfigScopeNotifications(ConfigScope scope, Object organizationId, Int32[] events, DateTime lastChecked, Boolean outlookRequest, LocatorServiceContext locatorServiceContext)
at NotificationService.GetNotifications(Object organizationId, Int32[] events, DateTime lastChecked, Boolean outlookRequest, LocatorServiceContext locatorServiceContext)
at DBNotificationsProvider.GetNotifications(DateTime lastChecked)
at NotificationManager.NotificationWatcherThreadProc(Object locatorServiceContext)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at ThreadHelper.ThreadStart(Object obj)
>ConnectionString: Workstation ID=SVCRMBES01.CrmAsyncService;Data Source=CRMSQLCLS\CRMSQLCLS;Initial Catalog=MSCRM_CONFIG;Integrated Security=True;Min Pool Size=2;Connect Timeout=150;Application Name=MSCRMAsyncService
[2012-06-22 09:53:51.221] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 27(MSCRM:-NotificationManager.NotificationWatcherThreadProc) |Category: Platform.Sql |User: 00000000-0000-0000-0000-000000000000 |Level: Info |ReqId: | NotificationService.GetNotifications
at NotificationService.GetNotifications(Object organizationId, Int32[] events, DateTime lastChecked, Boolean outlookRequest, LocatorServiceContext locatorServiceContext)
at DBNotificationsProvider.GetNotifications(DateTime lastChecked)
at NotificationManager.NotificationWatcherThreadProc(Object locatorServiceContext)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at ThreadHelper.ThreadStart(Object obj)
>SELECT OrganizationId, EventId, EventData, CreatedOn FROM Notification WHERE CreatedOn > '06/22/2012 01:40:20'
[2012-06-22 09:53:51.221] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 27(MSCRM:-NotificationManager.NotificationWatcherThreadProc) |Category: Platform.Sql |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | CrmDbConnection.InternalExecuteReader
at CrmDbConnection.InternalExecuteReader(IDbCommand command, Boolean capturePerfTrace)
at CrmDbConnection.ExecuteReader(IDbCommand command, Boolean impersonate, Boolean capturePerfTrace)
at NotificationService.GetConfigScopeNotifications(ConfigScope scope, Object organizationId, Int32[] events, DateTime lastChecked, Boolean outlookRequest, LocatorServiceContext locatorServiceContext)
at NotificationService.GetNotifications(Object organizationId, Int32[] events, DateTime lastChecked, Boolean outlookRequest, LocatorServiceContext locatorServiceContext)
at DBNotificationsProvider.GetNotifications(DateTime lastChecked)
at NotificationManager.NotificationWatcherThreadProc(Object locatorServiceContext)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at ThreadHelper.ThreadStart(Object obj)
>SELECT OrganizationId, EventId, EventData, CreatedOn FROM Notification WHERE CreatedOn > '06/22/2012 01:40:20'
[2012-06-22 09:53:51.221] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 27(MSCRM:-NotificationManager.NotificationWatcherThreadProc) |Category: Platform.Sql |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | CrmDbConnection.InternalExecuteReader
at CrmDbConnection.InternalExecuteReader(IDbCommand command, Boolean capturePerfTrace)
at CrmDbConnection.ExecuteReader(IDbCommand command, Boolean impersonate, Boolean capturePerfTrace)
at NotificationService.GetConfigScopeNotifications(ConfigScope scope, Object organizationId, Int32[] events, DateTime lastChecked, Boolean outlookRequest, LocatorServiceContext locatorServiceContext)
at NotificationService.GetNotifications(Object organizationId, Int32[] events, DateTime lastChecked, Boolean outlookRequest, LocatorServiceContext locatorServiceContext)
at DBNotificationsProvider.GetNotifications(DateTime lastChecked)
at NotificationManager.NotificationWatcherThreadProc(Object locatorServiceContext)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at ThreadHelper.ThreadStart(Object obj)
>Query execution time: 0.0 seconds; database: MSCRM_CONFIG; command: SELECT OrganizationId, EventId, EventData, CreatedOn FROM Notification WHERE CreatedOn > '06/22/2012 01:40:20'.
[2012-06-22 09:53:56.509] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 40 |Category: Sandbox |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | ExecutionContext.runTryCode
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at _TimerCallback.PerformTimerCallback(Object state)
>AppDomain: CrmAsyncService.exe
[2012-06-22 09:53:56.525] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 40 |Category: Sandbox.LoadBalancer |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | SandboxHostManager.PingHostsInternal
at SandboxHostManager.PingHostsInternal(Object stateObject)
at SandboxHostManager.PingHosts(Object stateObject)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at _TimerCallback.PerformTimerCallback(Object state)
>ENTER: PingHosts
[2012-06-22 09:53:56.525] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 40 |Category: Sandbox.LoadBalancer |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | SandboxHostManager.PingHostsInternal
at SandboxHostManager.PingHostsInternal(Object stateObject)
at SandboxHostManager.PingHosts(Object stateObject)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at _TimerCallback.PerformTimerCallback(Object state)
>checking host names list for new machines: 1
[2012-06-22 09:53:56.525] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 40 |Category: Sandbox.LoadBalancer |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | SandboxHostManager.PingHostsInternal
at SandboxHostManager.PingHostsInternal(Object stateObject)
at SandboxHostManager.PingHosts(Object stateObject)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at _TimerCallback.PerformTimerCallback(Object state)
>in: ready clients: 1
[2012-06-22 09:53:56.525] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 40 |Category: Sandbox.LoadBalancer |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | SandboxHostManager.PingHostsInternal
at SandboxHostManager.PingHostsInternal(Object stateObject)
at SandboxHostManager.PingHosts(Object stateObject)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at _TimerCallback.PerformTimerCallback(Object state)
>in: pending clients: 0
[2012-06-22 09:53:56.525] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 40 |Category: Sandbox.LoadBalancer |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | SandboxHostManager.PingHostsInternal
at SandboxHostManager.PingHostsInternal(Object stateObject)
at SandboxHostManager.PingHosts(Object stateObject)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at _TimerCallback.PerformTimerCallback(Object state)
>checking: SVCRMBES01
[2012-06-22 09:53:56.525] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 40 |Category: Sandbox.LoadBalancer |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | SandboxHostManager.PingHostsInternal
at SandboxHostManager.PingHostsInternal(Object stateObject)
at SandboxHostManager.PingHosts(Object stateObject)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at _TimerCallback.PerformTimerCallback(Object state)
>found on ready clients list: SVCRMBES01
[2012-06-22 09:53:56.525] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 40 |Category: Sandbox.LoadBalancer |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | SandboxHostManager.PingSingleClient
at SandboxHostManager.PingSingleClient(SandboxClient pingClient, SandboxHostInfo info)
at SandboxHostManager.PingHostsInternal(Object stateObject)
at SandboxHostManager.PingHosts(Object stateObject)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at _TimerCallback.PerformTimerCallback(Object state)
>PingSingleClient: enter: SVCRMBES01
[2012-06-22 09:53:56.525] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 40 |Category: Sandbox.LoadBalancer |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | SandboxHostManager.PingSingleClient
at SandboxHostManager.PingSingleClient(SandboxClient pingClient, SandboxHostInfo info)
at SandboxHostManager.PingHostsInternal(Object stateObject)
at SandboxHostManager.PingHosts(Object stateObject)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at _TimerCallback.PerformTimerCallback(Object state)
>pinging: SVCRMBES01
[2012-06-22 09:53:56.540] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 40 |Category: Sandbox.LoadBalancer |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | SandboxHostManager.PingSingleClient
at SandboxHostManager.PingSingleClient(SandboxClient pingClient, SandboxHostInfo info)
at SandboxHostManager.PingHostsInternal(Object stateObject)
at SandboxHostManager.PingHosts(Object stateObject)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at _TimerCallback.PerformTimerCallback(Object state)
>pingClient.HostStatus: Ready
[2012-06-22 09:53:56.540] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 40 |Category: Sandbox.LoadBalancer |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | SandboxHostManager.PingHostsInternal
at SandboxHostManager.PingHostsInternal(Object stateObject)
at SandboxHostManager.PingHosts(Object stateObject)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at _TimerCallback.PerformTimerCallback(Object state)
>adding to ready list: SVCRMBES01
[2012-06-22 09:53:56.540] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 40 |Category: Sandbox.LoadBalancer |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | SandboxHostManager.PingHostsInternal
at SandboxHostManager.PingHostsInternal(Object stateObject)
at SandboxHostManager.PingHosts(Object stateObject)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at _TimerCallback.PerformTimerCallback(Object state)
>SVCRMBES01: removedFromPending: False
[2012-06-22 09:53:56.540] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 40 |Category: Sandbox.LoadBalancer |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | SandboxHostManager.PingHostsInternal
at SandboxHostManager.PingHostsInternal(Object stateObject)
at SandboxHostManager.PingHosts(Object stateObject)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at _TimerCallback.PerformTimerCallback(Object state)
>checking bad list: 0
[2012-06-22 09:53:56.540] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 40 |Category: Sandbox.LoadBalancer |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | SandboxHostManager.PingHostsInternal
at SandboxHostManager.PingHostsInternal(Object stateObject)
at SandboxHostManager.PingHosts(Object stateObject)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at _TimerCallback.PerformTimerCallback(Object state)
>out: ready clients: 1
[2012-06-22 09:53:56.540] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 40 |Category: Sandbox.LoadBalancer |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | SandboxHostManager.PingHostsInternal
at SandboxHostManager.PingHostsInternal(Object stateObject)
at SandboxHostManager.PingHosts(Object stateObject)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at _TimerCallback.PerformTimerCallback(Object state)
>out: pending clients: 0
[2012-06-22 09:53:56.540] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 40 |Category: Sandbox.Monitoring |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | SandboxCounter.PublishCounters
at SandboxCounter.PublishCounters(SandboxHostConfiguration hostConfiguration)
at SandboxHostManager.PingHostsInternal(Object stateObject)
at SandboxHostManager.PingHosts(Object stateObject)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at _TimerCallback.PerformTimerCallback(Object state)
>>>>>>>>>>>
[2012-06-22 09:53:56.540] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 40 |Category: Sandbox.Monitoring |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | SandboxCounter.PublishCounters
at SandboxCounter.PublishCounters(SandboxHostConfiguration hostConfiguration)
at SandboxHostManager.PingHostsInternal(Object stateObject)
at SandboxHostManager.PingHosts(Object stateObject)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at _TimerCallback.PerformTimerCallback(Object state)
>executeResponseTimeInMsec: 0
[2012-06-22 09:53:56.540] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 40 |Category: Sandbox.Monitoring |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | SandboxCounter.PublishCounters
at SandboxCounter.PublishCounters(SandboxHostConfiguration hostConfiguration)
at SandboxHostManager.PingHostsInternal(Object stateObject)
at SandboxHostManager.PingHosts(Object stateObject)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at _TimerCallback.PerformTimerCallback(Object state)
>percentExecuteFailures: 0
[2012-06-22 09:53:56.540] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 40 |Category: Sandbox.Monitoring |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | SandboxCounter.PublishCounters
at SandboxCounter.PublishCounters(SandboxHostConfiguration hostConfiguration)
at SandboxHostManager.PingHostsInternal(Object stateObject)
at SandboxHostManager.PingHosts(Object stateObject)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at _TimerCallback.PerformTimerCallback(Object state)
>executesPerSecond: 0
[2012-06-22 09:53:56.540] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 40 |Category: Sandbox.Monitoring |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | SandboxCounter.PublishCounters
at SandboxCounter.PublishCounters(SandboxHostConfiguration hostConfiguration)
at SandboxHostManager.PingHostsInternal(Object stateObject)
at SandboxHostManager.PingHosts(Object stateObject)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at _TimerCallback.PerformTimerCallback(Object state)
>sdkResponseTimeInMSec: 0
[2012-06-22 09:53:56.540] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 40 |Category: Sandbox.Monitoring |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | SandboxCounter.PublishCounters
at SandboxCounter.PublishCounters(SandboxHostConfiguration hostConfiguration)
at SandboxHostManager.PingHostsInternal(Object stateObject)
at SandboxHostManager.PingHosts(Object stateObject)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at _TimerCallback.PerformTimerCallback(Object state)
>percentSdkRequestFailures: 0
[2012-06-22 09:53:56.540] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 40 |Category: Sandbox.Monitoring |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | SandboxCounter.PublishCounters
at SandboxCounter.PublishCounters(SandboxHostConfiguration hostConfiguration)
at SandboxHostManager.PingHostsInternal(Object stateObject)
at SandboxHostManager.PingHosts(Object stateObject)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at _TimerCallback.PerformTimerCallback(Object state)
>sdkRequestsPerSecond: 0
[2012-06-22 09:53:56.540] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 40 |Category: Sandbox.Monitoring |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | SandboxCounter.PublishCounters
at SandboxCounter.PublishCounters(SandboxHostConfiguration hostConfiguration)
at SandboxHostManager.PingHostsInternal(Object stateObject)
at SandboxHostManager.PingHosts(Object stateObject)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at _TimerCallback.PerformTimerCallback(Object state)
><<<<<<<<<<
[2012-06-22 09:53:56.540] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 40 |Category: Sandbox.LoadBalancer |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | SandboxHostManager.PingHostsInternal
at SandboxHostManager.PingHostsInternal(Object stateObject)
at SandboxHostManager.PingHosts(Object stateObject)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at _TimerCallback.PerformTimerCallback(Object state)
>EXIT: PingHosts
[2012-06-22 09:53:56.540] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 40 |Category: Sandbox.LoadBalancer |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | ExecutionContext.runTryCode
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at _TimerCallback.PerformTimerCallback(Object state)
>_loopCount: 5491
[2012-06-22 09:53:58.319] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 15 |Category: Shared |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | CrmDbConnection.Open
at CrmDbConnection.Open()
at DataAccessSharedBase.ExecuteSqlCommand(IDbCommand command, Nullable`1 expectedAffectedRecords)
at QueueDataAccess.MoveSuspendedToReady()
at <>c__DisplayClassf.<OnMoveSuspendedToReadyTimerEvent>b__e(IQueueDataAccess queueDataAccess, IOrganizationConfiguration orgConfig)
at QueueManager.ExecuteForAllOrganizations(OrganizationQueueDataAccessHandler handler)
at Timer.InvokeElapsedWithCancellationToken(Object state)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at ThreadPoolWorkQueue.Dispatch()
at _ThreadPoolWaitCallback.PerformWaitCallback()
>ConnectionString: Workstation ID=SVCRMBES01.CrmAsyncService;Data Source=CRMSQLCLS\CRMSQLCLS;Initial Catalog=YourCompany_MSCRM;Integrated Security=True;Min Pool Size=2;Connect Timeout=150;Application Name=MSCRMAsyncService
[2012-06-22 09:53:58.319] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 15 |Category: Platform.Sql |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | CrmDbConnection.ExecuteNonQuery
at CrmDbConnection.ExecuteNonQuery(IDbCommand command, Boolean impersonate, Boolean capturePerfTrace)
at DataAccessSharedBase.ExecuteSqlCommand(IDbCommand command, Nullable`1 expectedAffectedRecords)
at QueueDataAccess.MoveSuspendedToReady()
at <>c__DisplayClassf.<OnMoveSuspendedToReadyTimerEvent>b__e(IQueueDataAccess queueDataAccess, IOrganizationConfiguration orgConfig)
at QueueManager.ExecuteForAllOrganizations(OrganizationQueueDataAccessHandler handler)
at Timer.InvokeElapsedWithCancellationToken(Object state)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at ThreadPoolWorkQueue.Dispatch()
at _ThreadPoolWaitCallback.PerformWaitCallback()
> -
Friday, June 22, 2012 4:14 PM
SET DEADLOCK_PRIORITY LOW
BEGIN TRANSACTION
DECLARE @res INT
EXEC @res = sp_getapplock
@Resource = 'AsyncService_app_lock',
@LockMode = 'Exclusive'
IF @res NOT IN (0, 1)
BEGIN
RAISERROR ( 'Unable to acquire App Lock', 16, 1 )
END
ELSE
BEGIN
With TopSuspendedAsyncOperations(AsyncOperationId)
AS
(
Select Top(2000) AsyncOperationId
from AsyncOperationBase o1
where
StateCode = 1
and ((PostponeUntil is NULL) or (PostponeUntil <= '06/22/2012 15:53:58'))
and ((DependencyToken is NULL) or (not exists (
select AsyncOperationId
from AsyncOperationBase o2
where
o2.Sequence < o1.Sequence
and o2.DependencyToken = o1.DependencyToken
and o2.RecurrencePattern is null
and o2.StateCode in (0,2,1))))
)
update AsyncOperationBase
set
StateCode = 0,
StatusCode = 0,
ModifiedOn = '06/22/2012 15:53:58',
ModifiedBy = CreatedBy
From AsyncOperationBase join TopSuspendedAsyncOperations on
AsyncOperationBase.AsyncOperationId = TopSuspendedAsyncOperations.AsyncOperationId
EXEC @res = sp_releaseapplock
@Resource = 'AsyncService_app_lock'
END
COMMIT
[2012-06-22 09:53:58.319] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 15 |Category: Platform.Sql |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | CrmDbConnection.InternalExecuteNonQuery
at CrmDbConnection.InternalExecuteNonQuery(IDbCommand command, Boolean capturePerfTrace)
at CrmDbConnection.ExecuteNonQuery(IDbCommand command, Boolean impersonate, Boolean capturePerfTrace)
at DataAccessSharedBase.ExecuteSqlCommand(IDbCommand command, Nullable`1 expectedAffectedRecords)
at QueueDataAccess.MoveSuspendedToReady()
at <>c__DisplayClassf.<OnMoveSuspendedToReadyTimerEvent>b__e(IQueueDataAccess queueDataAccess, IOrganizationConfiguration orgConfig)
at QueueManager.ExecuteForAllOrganizations(OrganizationQueueDataAccessHandler handler)
at Timer.InvokeElapsedWithCancellationToken(Object state)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at ThreadPoolWorkQueue.Dispatch()
at _ThreadPoolWaitCallback.PerformWaitCallback()
>Query execution time: 0.0 seconds; database: YourCompany_MSCRM; command:
SET DEADLOCK_PRIORITY LOW
BEGIN TRANSACTION
DECLARE @res INT
EXEC @res = sp_getapplock
@Resource = 'AsyncService_app_lock',
@LockMode = 'Exclusive'
IF @res NOT IN (0, 1)
BEGIN
RAISERROR ( 'Unable to acquire App Lock', 16, 1 )
END
ELSE
BEGIN
With TopSuspendedAsyncOperations(AsyncOperationId)
AS
(
Select Top(2000) AsyncOperationId
from AsyncOperationBase o1
where
StateCode = 1
and ((PostponeUntil is NULL) or (PostponeUntil <= '06/22/2012 15:53:58'))
and ((DependencyToken is NULL) or (not exists (
select AsyncOperationId
from AsyncOperationBase o2
where
o2.Sequence < o1.Sequence
and o2.DependencyToken = o1.DependencyToken
and o2.RecurrencePattern is null
and o2.StateCode in (0,2,1))))
)
update AsyncOperationBase
set
StateCode = 0,
StatusCode = 0,
ModifiedOn = '06/22/2012 15:53:58',
ModifiedBy = CreatedBy
From AsyncOperationBase join TopSuspendedAsyncOperations on
AsyncOperationBase.AsyncOperationId = TopSuspendedAsyncOperations.AsyncOperationId
EXEC @res = sp_releaseapplock
@Resource = 'AsyncService_app_lock'
END
COMMIT.
[2012-06-22 09:53:58.319] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 15 |Category: Shared |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | CrmDbConnection.Open
at CrmDbConnection.Open()
at DataAccessSharedBase.ExecuteSqlCommand(IDbCommand command, Nullable`1 expectedAffectedRecords)
at QueueDataAccess.MoveSuspendedToReady()
at <>c__DisplayClassf.<OnMoveSuspendedToReadyTimerEvent>b__e(IQueueDataAccess queueDataAccess, IOrganizationConfiguration orgConfig)
at QueueManager.ExecuteForAllOrganizations(OrganizationQueueDataAccessHandler handler)
at Timer.InvokeElapsedWithCancellationToken(Object state)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at ThreadPoolWorkQueue.Dispatch()
at _ThreadPoolWaitCallback.PerformWaitCallback()
>ConnectionString: Workstation ID=SVCRMBES01.CrmAsyncService;Data Source=CRMSQLCLS\CRMSQLCLS;Initial Catalog=Default_MSCRM;Integrated Security=True;Min Pool Size=2;Connect Timeout=150;Application Name=MSCRMAsyncService
[2012-06-22 09:53:58.319] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 15 |Category: Platform.Sql |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | CrmDbConnection.ExecuteNonQuery
at CrmDbConnection.ExecuteNonQuery(IDbCommand command, Boolean impersonate, Boolean capturePerfTrace)
at DataAccessSharedBase.ExecuteSqlCommand(IDbCommand command, Nullable`1 expectedAffectedRecords)
at QueueDataAccess.MoveSuspendedToReady()
at <>c__DisplayClassf.<OnMoveSuspendedToReadyTimerEvent>b__e(IQueueDataAccess queueDataAccess, IOrganizationConfiguration orgConfig)
at QueueManager.ExecuteForAllOrganizations(OrganizationQueueDataAccessHandler handler)
at Timer.InvokeElapsedWithCancellationToken(Object state)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at ThreadPoolWorkQueue.Dispatch()
at _ThreadPoolWaitCallback.PerformWaitCallback()
>
SET DEADLOCK_PRIORITY LOW
BEGIN TRANSACTION
DECLARE @res INT
EXEC @res = sp_getapplock
@Resource = 'AsyncService_app_lock',
@LockMode = 'Exclusive'
IF @res NOT IN (0, 1)
BEGIN
RAISERROR ( 'Unable to acquire App Lock', 16, 1 )
END
ELSE
BEGIN
With TopSuspendedAsyncOperations(AsyncOperationId)
AS
(
Select Top(2000) AsyncOperationId
from AsyncOperationBase o1
where
StateCode = 1
and ((PostponeUntil is NULL) or (PostponeUntil <= '06/22/2012 15:53:58'))
and ((DependencyToken is NULL) or (not exists (
select AsyncOperationId
from AsyncOperationBase o2
where
o2.Sequence < o1.Sequence
and o2.DependencyToken = o1.DependencyToken
and o2.RecurrencePattern is null
and o2.StateCode in (0,2,1))))
)
update AsyncOperationBase
set
StateCode = 0,
StatusCode = 0,
ModifiedOn = '06/22/2012 15:53:58',
ModifiedBy = CreatedBy
From AsyncOperationBase join TopSuspendedAsyncOperations on
AsyncOperationBase.AsyncOperationId = TopSuspendedAsyncOperations.AsyncOperationId
EXEC @res = sp_releaseapplock
@Resource = 'AsyncService_app_lock'
END
COMMIT
[2012-06-22 09:53:58.334] Process:CrmAsyncService |Organization:00000000-0000-0000-0000-000000000000 |Thread: 15 |Category: Platform.Sql |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: | CrmDbConnection.InternalExecuteNonQuery
at CrmDbConnection.InternalExecuteNonQuery(IDbCommand command, Boolean capturePerfTrace)
at CrmDbConnection.ExecuteNonQuery(IDbCommand command, Boolean impersonate, Boolean capturePerfTrace)
at DataAccessSharedBase.ExecuteSqlCommand(IDbCommand command, Nullable`1 expectedAffectedRecords)
at QueueDataAccess.MoveSuspendedToReady()
at <>c__DisplayClassf.<OnMoveSuspendedToReadyTimerEvent>b__e(IQueueDataAccess queueDataAccess, IOrganizationConfiguration orgConfig)
at QueueManager.ExecuteForAllOrganizations(OrganizationQueueDataAccessHandler handler)
at Timer.InvokeElapsedWithCancellationToken(Object state)
at ExecutionContext.runTryCode(Object userData)
at RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at ThreadPoolWorkQueue.Dispatch()
at _ThreadPoolWaitCallback.PerformWaitCallback()
>Query execution time: 0.0 seconds; database: Default_MSCRM; command:
SET DEADLOCK_PRIORITY LOW
BEGIN TRANSACTION
DECLARE @res INT
EXEC @res = sp_getapplock
@Resource = 'AsyncService_app_lock',
@LockMode = 'Exclusive'
IF @res NOT IN (0, 1)
BEGIN
RAISERROR ( 'Unable to acquire App Lock', 16, 1 )
END
ELSE
BEGIN
With TopSuspendedAsyncOperations(AsyncOperationId)
AS
(
Select Top(2000) AsyncOperationId
from AsyncOperationBase o1
where
StateCode = 1
and ((PostponeUntil is NULL) or (PostponeUntil <= '06/22/2012 15:53:58'))
and ((DependencyToken is NULL) or (not exists (
select AsyncOperationId
from AsyncOperationBase o2
where
o2.Sequence < o1.Sequence
and o2.DependencyToken = o1.DependencyToken
and o2.RecurrencePattern is null
and o2.StateCode in (0,2,1))))
)
update AsyncOperationBase
set
StateCode = 0,
StatusCode = 0,
ModifiedOn = '06/22/2012 15:53:58',
ModifiedBy = CreatedBy
From AsyncOperationBase join TopSuspendedAsyncOperations on
AsyncOperationBase.AsyncOperationId = TopSuspendedAsyncOperations.AsyncOperationId
EXEC @res = sp_releaseapplock
@Resource = 'AsyncService_app_lock'
END
COMMIT. -
Friday, June 22, 2012 4:19 PM
Can you show your code here.
Regards Karan Mittal
-
Friday, June 22, 2012 10:09 PM
Yep. Just to take out any variables, I pared down one of my plugins to something super simple:
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
using System.Net;
using Microsoft.Xrm.Sdk;
namespace CreatingOpp
{
public class UpdateOppHandler : IPlugin
{
public void Execute(IServiceProvider serviceProvider)
{
string fileDate = DateTime.Now.ToShortDateString().Replace("/", "-") + "_" + DateTime.Now.ToLongTimeString().Replace(":", "").Replace(" ", "");
string path = string.Format(@"C:\Logs\CreatingOpp\{0}.txt", fileDate);
System.IO.TextWriter tw = new System.IO.StreamWriter(path);
tw.WriteLine("hey, this actually works!!!");
tw.Close();
}
}
} -
Monday, June 25, 2012 9:48 PMAlso, I provided this DLL to someone else and they were able to successfully register it in their company's CRM environment. On a hunch, I tried to register this DLL in the Sandbox environment and it was successfully updated. So all indications point to a permissions issue. But I verified I am a member of the local Administrators group on all three of our CRM servers (1 async and 2 web servers). And I am a System Administrator in CRM and a Deployment Administrator in the Deployment Manager tool. I also had the person in my organization who performed the CRM 4.0 to CRM 2011 Import try to register the DLL, and he received the same error.
-
Monday, June 25, 2012 10:53 PM
Solved the issue. Had to do with an error occurring while normalizing non-case sensitive AD credentials for use on a case sensitive SQL installation. The fix was to do the following:
Add ‘PreferredDC’ registry key on CRM servers.
- Go to the following registry hive: HKLM\Software\Microsoft\MSCRM
- Add a new String value that is named PreferredDc.
- Specify the domain controller that you want. Typically, this is the closest domain controller.
- Add this key to all 3 CRM servers and restart the CRM server