web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

Crossover happening between async plugins running concurrently - logs are getting combined

(0) ShareShare
ReportReport
Posted on by 262

On our CRM v8.2 On Prem system we have numerous plugins running async, and part of the process is creating a log of changes then writing them to a log entity.  I know we can use the built in plugin logging, but we also need to write to a separate entity for other reasons.  Anyway I basically create a string and write to it throughout the plugin, then in the end it gets written to the log.  What I'm finding is that if the plugin runs multiple times the log gets jumbled up, so the log of many runs is saved to the same record, just concatenated together.  The problem I'm running into now is if I bulk load data and this plugin runs hundreds or thousands of times and the queue builds up with many async plugins to run the log gets so large it can't write.   We never saw this in testing as we only tested one at a time, but now with so many running together as bulk load or just many at once in Production as the processes are used I'm seeing the logs jumble up. 

I will update the plugin to clear the log variable after each run, but why would this be happening? I would think each run would be encapsulated within itself, but that doesn't appear to be the case.  Just trying to make since of what's happening.  Thanks.

I have the same question (0)
  • Charan Raju C R Profile Picture
    7 Moderator on at

    Hi Samalex,

    What is the scope of the string variable, declared globally or locally inside the function? If it declared globally, please try to declare it locally and pass it as a parameter to other functions wherever it is required.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 83 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

#3
#ManoVerse Profile Picture

#ManoVerse 40

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans