Skip to main content

Notifications

Microsoft Dynamics CRM forum
Unanswered

MSCRMAsyncService

Posted on by 10

After migration from CRM 2011 to CRM 365 ON-PREMISE, there is a problem with MSCRMAsyncService
After a certain period of time (it can be 5 minutes, or maybe several hours), tasks in the queue receive the "Waiting For Resources" status and do not go into the In Progress state
They accumulate in the queue until you restart the MSCRMAsyncService
Tell me, what could this be related to?
I've tried changing different DeploymentProperties settings - it doesn't work.

  • ThomasBergmair Profile Picture
    ThomasBergmair 5 on at
    RE: MSCRMAsyncService

    Hi,

    any news about that. we have the same behavior. After every async service restart round about 1000 systemjobs are done. All other waitung for resource. 

    Regards

    Thomas

  • S_M Profile Picture
    S_M 10 on at
    RE: MSCRMAsyncService

    We will turn to MS support, but they have a rather long bureaucratic procedure ...

    I still hope that maybe someone can help me here ...

  • Hari Narayanan Profile Picture
    Hari Narayanan 589 on at
    RE: MSCRMAsyncService

    If it is a generic issue faced by others community would help with the solutions they have done, like i have shared my findings from other projects i have worked on. But to get a dedicated support specific to your implementation correct way is to raise a Microsoft support.

  • S_M Profile Picture
    S_M 10 on at
    RE: MSCRMAsyncService

    I turned on Tracing - there is nothing in the logs that deserves attention. I wrote here. when I went through all the standard features. Are you saying that they won't help me here?

  • Hari Narayanan Profile Picture
    Hari Narayanan 589 on at
    RE: MSCRMAsyncService

    It is strange that MSCRMAsyncService is not shown in the process list. I would suggest you to try enable tracing and capture and verify tracelogs for possible errors. If nothing works out raising a support ticket for Microsoft support is the way forward.

  • S_M Profile Picture
    S_M 10 on at
    RE: MSCRMAsyncService

    Indexing is carried out every Saturday for those tables, the fragmentation of which is more than 20%

    I thought about blocking, but when I give the exec sp_whoisactive command, there are no blocking processes.

    Also, there are no MSCRMAsyncService processes in the list.

    Restarting the SQL Server service gives nothing

    Only restarting the MSCRMAsyncService helps

  • Hari Narayanan Profile Picture
    Hari Narayanan 589 on at
    RE: MSCRMAsyncService

    If the database connection is lost, you would see such error in Event viewer and source as MSCRMAsyncService.

    The SQL query you have mentioned is good for one time clean up, and it should not be scheduled for any daily routine activites, Please use bulk delete jobs to delete any async operation base.

    When such pileup of workflow jobs occur, you have to monitor any blocking or deadlock at SQL in AsyncOperationBase table. you may have to engage SQL DBA to troubleshoot issue further as i suspect the issue is due to SQL.

    Try to do reindex or rebuild according to the fragmentation level of the tables.

  • S_M Profile Picture
    S_M 10 on at
    RE: MSCRMAsyncService

    The most important question: how to determine if the connection between the service and the database is lost or not?

    Now there are 15 186 records in the table.

    I clean the records with a query from the article:    

    support.microsoft.com/.../performance-is-slow-if-the-asyncoperationbase-table-becomes-too-large-in-microsoft-dynamics-crm-334a0738-e132-1ea7-cab3-7fd68cb823a4

  • Hari Narayanan Profile Picture
    Hari Narayanan 589 on at
    RE: MSCRMAsyncService

    This error does not seems to be the reason for the async services to stop as your async stops at random but error occurs every 3 seconds.

    Since you said you are clearing the table every night. How do you clear the table? Bulk delete job? Batch job?

    How many records do you have at asyncoperationbase?

  • S_M Profile Picture
    S_M 10 on at
    RE: MSCRMAsyncService

    I clear the table every night and that's not the point. There is only one log - event id 18432. This log is generated every 3 seconds

    My version is -  MSCRMAsyncService loses its connection to the database.

    Tell me, is it possible to track and correct this condition?

    Thank you.

    LOG  Event 18432 ConfigDB:

    The locator service failed to connect to the configuration database (MSCRM_CONFIG). The error was: System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'OrganizationLifecycle'.

      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.TryConsumeMetaData()

      at System.Data.SqlClient.SqlDataReader.get_MetaData()

      at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)

      at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)

      at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)

      at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)

      at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)

      at Microsoft.Crm.CrmDbConnection.LockConnectionAndExecuteMethod[TResult](IDbConnection connection, Func`1 executeMethod)

      at Microsoft.Crm.CrmDbConnection.InternalExecuteWithRetry[TResult](Func`1 ExecuteMethod, IDbCommand command, ICrmTransaction crmTransaction)

      at Microsoft.Crm.CrmDbConnection.<>c__DisplayClass157_0.<InternalExecuteReader>b__0()

      at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func`1 func, IEnumerable`1 additionalCustomProperties)

      at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func`1 func)

      at Microsoft.Crm.CrmDbConnection.InternalExecuteReader(IDbCommand command, Nullable`1 commandBehavior, ICrmTransaction crmTransaction, Int32 sourceLineNumber, String memberName, String sourceFilePath)

      at Microsoft.Crm.CrmDbConnection.ExecuteReader(IDbCommand command, Boolean impersonate, Int32 sourceLineNumber, String memberName, String sourceFilePath)

      at Microsoft.Crm.SharedDatabase.DatabaseService.ExecuteBaseReader(CrmDbConnection connection, IDbCommand command, String[] columns, IDictionary collectionToFill)

    ClientConnectionId:cd7bcd69-ded5-4af0-b67a-5b4af0df1c1c

    Error Number:208,State:1,Class:16.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,524 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,493 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans