After updating our CRM 2016 environment to version 8.2.1.176 (Dynamics 365) we encountered the CallManagerInfo error described by Maco in this question CRM 365 callManagerInfo error in plugins.
So I tried out the solution provided and set the registry key on both our application servers. This seemed to fix the problem but now I'm coming across another issue. I already noticed that in the eventlog of the application servers sometimes errors came up about "Invalid Trace directory" but because I wasn't using tracing at the moment I ignored it at first.
Then one of our application servers was getting extremely slow and I had trouble connecting to it via RDP. It calmed down after some more minutes and I checked a few things and then saw that there were quite a lot Sandbox Worker Processes running. Restarting the Sandbox Processing Service didn't really help because after a few seconds there were again a lot of Worker Processes running and also the tracing eventlog error messages came up again.
After some searching I found some suggestions to set tracing on and set some other regkeys but nothing helped so far. Everything I tried is described in this blog post https://blog.qualtechsoftware.com/high-number-of-sandbox-worker-processes-dynamics-365/
But what I found out is that when I set the Singlebox regkey from the callManagerInfo back to 1 and restart the service only one Worker process will run. The name of the regkey seems to imply something like that. :)
I'm not completely sure yet if the many Worker Processes caused the slow-down but on one server there are already over 80 precesses running which doesn't look right to me. I changed the regkey now back to the old value in our QA environment but I'm pretty sure that then the CallManagerInfo errors will come up again.
So is this there any way to get rid of both problems? I also activated tracing for some because it was suggested in the article and when checking the files they contained this
[2017-09-08 14:57:03.371] Process:Microsoft.Crm.Sandbox.WorkerProcess |Organization:00000000-0000-0000-0000-000000000000 |Thread: 13 |Category: Exception |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: 00000000-0000-0000-0000-000000000000 |ActivityId: b2b6cdd8-4dee-4b05-827e-a83887cc2f9e | WarmUpMockListener.Execute ilOffset = 0x1A
at WarmUpMockListener.Execute(SandboxCallInfo callInfo, SandboxSdkContext requestContext, String operation, Byte[] serializedRequest) ilOffset = 0x1A
at ilOffset = 0xFFFFFFFF
at SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) ilOffset = 0x222
at DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) ilOffset = 0xC4
at ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) ilOffset = 0x48
at MessageRpc.Process(Boolean isOperationContextSet) ilOffset = 0x65
at Wrapper.Resume(Boolean& alreadyResumedNoLock) ilOffset = 0x1B
at ThreadBehavior.ResumeProcessing(IResumeMessageRpc resume) ilOffset = 0x8
at ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) ilOffset = 0x79
at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) ilOffset = 0x9
at QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() ilOffset = 0x33
at ThreadPoolWorkQueue.Dispatch() ilOffset = 0xA4
>Crm Exception: Message: Test, ErrorCode: -2147220970
The message "Test" doesn't look like it intended. So it looks like some kind of bug in the Sandox Service. :(
Any suggestions?