Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to reduce memory consumption for Orchard CMS site hosted on Windows Azure Websites

I have an Orchard CMS website currently hosted on Windows Azure Websites.

Its a pretty standard blog where images are hosted via skydrive and linked, so the blog itself only serves html.

I've set it in Shared mode, running 1 instance.

But I keep getting quota reached. and it seems like my site is always maxing out the memory (max is 512mb per hour) and I can't understand why?

I've tried increasing to 3 instances, but it doesn't increase the maximum memory I can use.

Update:

The maximum usage for websites under Shared mode are:
CPU Time: 4 hours per day, 2.5minutes per 5 minute
File System: 1024mb
Memory usage: 512mb per hour
Database: 1024mb (web instance)

Update2:

I've tried re-creating my website in different zones. Currently my site is hosted in US West, which has the above limits, but other zones have slightly different limits, such as East Asia has 1024mb per hour memory usage limit! I haven't been able to dig up any documentation on this, which is puzzling.

Update3:

In Update2 I mentioned that different regions have different "memory usage per hour limit". This is actually not true. I had set up a new site under the "Free" setting with 1024mb per hour, but when I switched this to "Shared" the memory usage limit came down to 512mb per hour.


I have not been able to reproduce this issue in any of my other sites despite being the same source code, which leads me to believe its something weird with my particular azure website set up. Possibly something to do with the dashboard as mentioned by @Vinblad.

I'm planning to set up a new azure website in a different region, and while I'm at it, upgrade to Orchard 1.6

like image 844
EdmundYeung99 Avatar asked Oct 23 '22 01:10

EdmundYeung99


2 Answers

Had a similar issue on Azure with Orchard. It was due to the error log files continually increasing and taking up space. Manually deleting files at the moment but have to look into a more automated solution.

like image 157
danmce Avatar answered Nov 01 '22 13:11

danmce


512MB / hour doesn't make any sense at all, I agree with Steve. 512MB (not per hour) is more than enough to host Orchard however. Try to measure memory on your local copy of the site. If you do get abnormal memory consumption, try to profile it and find the module that's responsible for it. If not, then contact Azure support and ask them why the same application would take more memory on Azure than on your local machine.

Another thing to investigate would be caching: do you have output caching enabled?

like image 41
Bertrand Le Roy Avatar answered Nov 01 '22 12:11

Bertrand Le Roy