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.

  • Charan Raju C R Profile Picture
    7 Moderator on at
    RE: Crossover happening between async plugins running concurrently - logs are getting combined

    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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

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

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,245 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,927 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans