Dynamic Compilation

Topics: Troubleshooting
Dec 2, 2011 at 6:29 PM

Hi all. My name is Lance and I have been leading a team developing a commerce site using Orchard and I am worried about dynamic compilation as we get closer to launch. A couple of months ago we had a serious problem with Orchard recompiling it's modules about twice a minute. I had set all of the appPool settings to zero (see below) as I thought IIS might be doing it. This did not do the trick and finally we rebuilt stage.

Now the issue has cropped up in test and I cannot treat this as a one time occurance.

My method of detecting when a recompile is taking place is by logging whenever Application_Start fires in Orchard's Global.asax. Not uncommon to see it re-starting two or three times a minute.

Can someone give me some direction as to where to look in the codebase to understand when and why the system decides to recopile itself? I need to understand this prior to launch.

Thanks in advance for any help!

AppPool settings:

Idle Time-out, 0
Private Memory Limit, 0
Regular Time Interval, 0
Request Limit, 0
Specific Times, none
Virtual Memory Limit, 0

 

 

Coordinator
Dec 2, 2011 at 7:25 PM

The web site recompiles itself at the module level, so it's not for the whole system. But, when a module is recompiled IIS restarts the application, as if the /bin or the web.config were modified.
The website can also be restarted if a new module is installed. 

A recompilation occurs only if a file in those specific folders are changed. Orchard watches for changes on modules (custom and core), and themes. I am not even sure that those restarts are due to a recompilation, maybe something else is triggering it.

I'd like to help you. Can you send me some information on the modules you are using or you have created ?
Can I have access to their source code ?
Can I reproduce this behavior locally ?
Does it also happen when there is no traffic or under load tests only ?

You can contact me by codeplex, and we can post a follow up on this thread when we have found the issue.

 

 

Coordinator
Dec 2, 2011 at 7:39 PM

By the way, disabling dynamic compilation should be as simple as removing the buildProviders entry in the web.config, on your production deployments.

Dec 2, 2011 at 8:49 PM

We have a few custom modules installed of which Modern Greetings is by far the biggest. I can't give you source code for that however.

I doubt that you can reporduce this locally since I have no idea how to reproduce myself exept to put a small load on the site.

After load has stopped for a while (I tell my testers to test elsewhere) the Application_Starts will stop, but as soon as I tell my testers to use it it starts restarting again.

I doubt the the application is restarting because of recompilation but it would be nice if I could verify this. This means I would need to monitor the same things that Orchard does.

I also doubt that IIS or the AppPool is recycling since I am logging every event possible and it has happend only a handful of times today. Applicaiotn_Start for Orchard has fired at least fifty times today.

Thanks for taking this up BTW.