Recently, in Dynamics CRM, we were coming across some issues with the processing of async services (specifically plugins). The environment was pretty robust, but we had a lot of processes going on, and we would frequently see the async services max out what memory we had available on the server, which required a restart of the services (not ideal).
There are several things that can cause this, and therefore several solutions. It could be a memory leak somewhere in the plugin code or just an overall weak environment, but we were pretty confident that neither of these were the issue in our case.
I came across this blog by Henry Cordes which ended up helping us out quite a bit. Although it is an older post, the idea still applies to current deployments of Dynamics CRM. It touches on a few of the settings in the DeploymentProperties table of the MSCRM_CONFIG database, specifically "AsyncInMemoryHigh" and "AsyncInMemoryLow." These settings allow you to choose the maximum number of tasks that are being processed (High) and then once the number of tasks processed reaches a certain number (Low) it retrieves more. This allows us to have more control over our async processes, and after implementation we saw that the problem was eliminated on our server. This can be helpful when there are numerous async processes that need to be managed, but can also be very helpful if your server doesn't have much memory available.
I highly suggest you click the link above and read through Henry's post, it may just be the solution you are looking for!
About the Author:
TopLine Strategies delivers the complete integration and development of sales, marketing and customer service technologies that enable corporate clientele to improve revenue streams and strengthen customer interactions. Our project management and consulting is designed to achieve timely delivery, 100 percent user adoption of the technologies we implement and deliver measurable returns on investments for our clients.