Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Changing the runAllManagedModulesForAllRequests setting


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?


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

Sep 27, 2017 16:53

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.

Sep 27, 2017 21:47

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

Sep 27, 2017 22:04

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

Sep 27, 2017 22:47

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

Sep 27, 2017 22:50

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.

Edited, Nov 15, 2017 14:29

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. 

Nov 15, 2017 14:59

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.
Nov 15, 2017 16:04

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 :)

Nov 15, 2017 16:15

Got it :)

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.