This project is read-only.

Orchard choosing the bad Compilation option in Azure Web Sites, HostComponents not working ?

Topics: Core, Customizing Orchard, General, Installing Orchard, Troubleshooting
Jan 2, 2013 at 9:03 AM
Edited Jan 2, 2013 at 9:08 AM

As my sites under Azure Web Site in Reserved mode with 2 cores and 3,5 Gb memory (Western Europe) are still lagging and frequently stopping on Error 502, I have been reading this doc to better understand:

It appears that Orchard is preferring the DynamicLoader than the Precompiled module loader in some circonstances in Azure Web Sites.

Using VS 2012 and web deply, I took care to generate my solution, checking that in the bin folders of modules there was a recent assembly(dll), but Orchard continues to prefer compiling if there is a csproj file for this module whatever the dll date.

And this is also available for core modules.

I attached the generated dependencies.xml and dependencies.compiled.xml in this issue report

where we can see that even with a recent assembly in bin folder, it takes the dynamic loader.

And I have installed the the HostComponents.config file ....which seems to be not used ?

I also do some tracing replacing WARNING by ALL in the log4net.config and I attached the resulting file.
It appear THAT ON AZURE WEB SITES some paths are too long, this could be the reason for our problems ????
The other thing to note is that the assemnlies identification and loading process is very long....and if on AWS it does this on each request......

Jan 2, 2013 at 6:55 PM

I renamed 80% of the .csproj files in .csproj.bad and the site start running ok. From 5 minutes for 1 page to 10 seconds....

I have a witness site in same reserved instance and it gives me 502s with the .csproj!

The dependencies.xml still reference the DynamicExtensionLoader, even after automatic recreation following my delete and the delete of all dlls in same folder....

I am using a single instance in reserved mode ??????
Thanks to anyone in position to explain this ????? 

Jan 2, 2013 at 9:44 PM

Is there a way to avoid vs2012 web_deploy to deploy the .csproj file ?

Jan 3, 2013 at 5:22 AM

Is web deploy updating the date modified on the .csproj files?

Have you considered using github to deploy to Azure? I setup an Orchard site in a couple of minutes by forking the repository and configuring an Azure site to pull from Github.

I followed this article:

Jan 4, 2013 at 9:57 AM

@jonathan Github  is missing the necessary modularity you gain working with VS because part of my deployment contains personal modules which could necessitate high complication creating branch, etc. 

And I think that Gihub have the same problem as web deploy, it deploys also csproj because Orchard need them: it is in the Orchard code, it seems that on any request  (?) all assemblies are identified and checked for a necessary rebuild. Then if a csproj exists, it is used to generate them.

Problem is that in Azure Web Sites, the test always drive to a rebuilt with the csproj, this explains that the more modules you add, the more it takes times to Orchard. 

This is complicated by the cross references which drive to several builds for the same assembly.

I have no idea of the reason of this problem: bad modification date ? Special nature of the azure web site file system ???