SaaS CMS has officially launched! Learn more now.

Changing the runAllManagedModulesForAllRequests setting

Vote:
 

Is there any gotchas to set "runAllManagedModulesForAllRequests" to false in web.config?

The modules I see that have a preCondition is:

  1. EPiServer.Framework.Initialization.InitializationModule
  2. EPiServer.Web.RoutingUrlRewriteModule
  3. Mediachase.Commerce.Core.Modules.BusinessFoundationInitializeModule

Would it be safe if those aren't run for all request?

Background:

We are running commerce 11.2.0 and have noticed database calls when loading product images.

Specifically this have been traced back to BusinessFoundationInitializeModule that loads a CustomerContact to populate DataContext.Current.CurrentUserId in context_AuthorizeRequest.

The result is being cached but during periods of high traffic on the server we seem to be getting more db calls so we suspect that the cache might get evicted at high load.

As a sidenote it is interesting to see it load an entire contact with organization plus addresses and then only use the Id (Although it populatez the cache so it -might- not be wasted). ^^

Kind Regards

Erik Norberg

#182682
Sep 27, 2017 16:53
Vote:
 

Interesting question - this is one part that is too scary to anyone to change. First rule - you don't talk about runAllManagedModulesForAllRequests. Second rule, you don't talk about runAllManagedModulesForAllRequests. 

I can't provide official statement, because we haven't tested it. But if you can provide profiling result, it can make a better argument for me to spend time looking into it.

#182688
Sep 27, 2017 21:47
Vote:
 

When are we getting reactions in the forum? Pretty sure we need reactions in the forum. :joy:

#182689
Sep 27, 2017 22:04
Vote:
 

Joel, I can add an emoticon. cool That's the same as a reaction, right?  Do you see the smiley face toolbar button?

#182691
Sep 27, 2017 22:47
Vote:
 

Sort of, but not entirely! What I mean with reactions is basically an emoticon attached to a post. Would be cool to "react" to a post without adding a new post, just as Slack, Facebook, Skype, etc does. So you don't bloat the topic, which we are doing right now tongue-out

#182692
Sep 27, 2017 22:50
Vote:
 

Hi Quan and Erik,

I noticed the same with BusinessFoundationInitializeModule as you describe Erik. See the profiling results (image below) of multiple image request. Refreshed a couple of times and then suddently it does a DB call to "cls_contact" in BusinessFoundationInitializeModule.

#185331
Edited, Nov 15, 2017 14:29
Vote:
 

As I said, the configuration can has unforseen consequences. As we haven't tested it, we cannot recommend to turn it off.

Performance is important but not at the cost of correctness. 

#185334
Nov 15, 2017 14:59
Vote:
 

Quan I understand but my comment was for this :)

I can't provide official statement, because we haven't tested it. But if you can provide profiling result, it can make a better argument for me to spend time looking into it.
#185336
Nov 15, 2017 16:04
Vote:
 

OK :)

By profiling result, I meant that the result that says running with runAllManagedModulesForAllRequests = false yield significant performance improvements over running with true (So I can argue with my team that this is something we should look into). Thanks for the profiling result, but in this case I'm a bit afraid that was not clear/enough :)

#185339
Nov 15, 2017 16:15
Vote:
 

Got it :)

#185340
Nov 15, 2017 16:20
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.