This project is read-only.

high memory usage

Topics: Business Logic Layer
Mar 15, 2012 at 5:59 PM
Edited Mar 15, 2012 at 6:00 PM

I received an email and phone call from Go daddy support and saying that my site utilizing more than 1GB of memory on their shared host server. I got less than 5 days to sort out or face suspension.

I have about 10K blog posts and running BlogEngine.NET

can somebody tell me how I could resolve this issue? Very urgent

see go daddy’s email below:

"Your domain was observed to be utilizing up to 1GB of memory in the shared environment. This is unacceptable as it causes a negative impact for other users on the shared server. Our administrators attempted to kill the processes associated with this site, but this did not reduce the memory usage on the server. They have renamed the directory associated with this alias domain to mitigate resource consumption. You will need to review all scripts and plug-ins to ensure they are closing connections in a timely manner. *IMPORTANT* a response from you regarding this situation is required. Your site has been scheduled for suspension on March 20, 2012 . If you fail to address this matter your services may be suspended."

Mar 16, 2012 at 3:07 AM

I doubt there is a silver bullet for this one. Last time I looked, BE.Net preloads all posts into memory and keeps them there. Killing the process and then hitting the site is just going to reuse roughly the same memory again.

This is one of my gripes with the design. A better way to go would be to load from the store on demand and get performance either by using out of the box ASP.Net caching, or another caching implementation and then use a sliding cache expiration. The inflexibility of this design is one of the downsides of using the ActiveRecord pattern and it's not easy to change without a major rewrite of the system.

Mar 16, 2012 at 11:04 AM

rprimrose is probably right that the volume of posts you have is causing the high memory.  But you could verify it by temporarily moving the posts (or rename your "posts" folder to something else), and then create an empty "posts" folder (maybe put a couple of posts in there), and restart BE by making any change to the web.config file, and then hit the site (navigate to it), and after the site has come up, check the memory (you might have to get in contact with GoDaddy support to check this).

There is a remote possibility that some other extension or widget is causing the memory to be high, but it's likely the number of posts.

Mar 16, 2012 at 11:32 AM

Thanks guys. 

My blog provider is DbBlogProvider and using mssql 2005.

I haven't added any new extensions or widgets for the last 2 years.  Therefore I reckon this is due to number of blog posts i have in my DB.  I don't know what else to do now. 


Mar 16, 2012 at 11:40 AM

One solution would be to move your blog to a different host that allows you to use more memory, it seems like most places have a limit of 200 MBs or so of memory.

Another solution would be to move your blog to a VPS where you won't have this restriction.  Even if it's a VPS that only has 1 GB of memory, it will probably still work since the OS will probably use the disk to store extra data it cannot hold in memory (virtual memory or something along these lines).  You could even go with a VPS with 2 GBs or so of memory, and if you can find other websites to put on the VPS, that'll help justify moving from shared hosting to a VPS.

Mar 16, 2012 at 11:53 AM

I had quick look at the VPS options but it is very expensive.  (my site is a non-profit so i don't think we can afford it)

Would you recommend any good vps hosts with reasonable price?

Mar 16, 2012 at 12:50 PM

I don't know if you looked at them, but GoDaddy's Virtual Private Servers are on the low end (make sure to click on the Windows tab on the right side for Windows machines)

The Economy one is $23.99/month if you pre-pay for 1 year, or $29.99 a month.  The Value plan is a 2 GB server and is $32 - $40/month depending on if you prepay for the entire year.

GoDaddy also has cloud computing, but it looks like that is more expensive ... even at 6 cents per hour.

Other hosts I think are typically more expensive.  I once had a GoDaddy VPS (virtual dedicated server) and it ran pretty decently.  I think it was the Value one.

Mar 16, 2012 at 2:33 PM
Edited Mar 16, 2012 at 4:20 PM

Thanks Ben.

I don't think we can afford this at the moment.  So I've been asked to look at alternate solution