running out of memory at discountasp.net

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 anos atrás
discoutnasp.net limts each site to 200mb of memory for their app pool. I am hitting that limit. I am running v1.8. What can I do to reduce the amount of memory the app uses. session state to sql? Anything? Client is pissed. I had no idea that discountasp did that. Do I really need to take them to dedicated hosting??? I need to solve this once and for all. I had thougth it was due to them using lareg images in their blogs but I cannot see how that would affect the memory in the app pool. It causes a server response of 503. The backgound error is event id 5013.

Any help would be appreciated. Add campain started which brough the site down for an hour. It runs again tomorrow and for several days.
13 anos atrás
Check either arvixe.com or http://www.softsyshosting.com
13 anos atrás
I have hosted on discount asp but I never had this problem. The app pool memory for me normaly goes to 140mb. How many products do you have? and did you have any modification to the code?

Also I host my websites on my own dedicated server now so if you want you can host it there for £25/month. Your website would be up always.
13 anos atrás
The layout is custom. The shipping has a few lines of custom. That is it. There is only a about a hundred products. It is the number of users I htink. We had 12gb of bandwidth used yesterday.

Anyoen think moving the session state to SQL will help as a temp fix?
13 anos atrás
The blog post page was the largest page hit yesterday. It had 16 thousend unique users. It had a few large images. Any way I can tuen this page? I am lookign at the code now. Any suggestiosn woudl be appreciated. I am lookign for any way to reduce the memory use of the site to stay below 200mb.

I will look to move the site ASAP but need to get he site to limp alonf until then.

Is no one else having this issue with NopCommerce?
13 anos atrás
this is that pages code behind.





using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using NopSolutions.NopCommerce.BusinessLogic;
using NopSolutions.NopCommerce.BusinessLogic.Configuration.Settings;
using NopSolutions.NopCommerce.BusinessLogic.Content.Blog;
using NopSolutions.NopCommerce.BusinessLogic.CustomerManagement;
using NopSolutions.NopCommerce.BusinessLogic.Profile;
using NopSolutions.NopCommerce.BusinessLogic.SEO;
using NopSolutions.NopCommerce.BusinessLogic.Utils.Html;
using NopSolutions.NopCommerce.Common;
using NopSolutions.NopCommerce.Common.Utils;

namespace NopSolutions.NopCommerce.Web.Modules
{
    public partial class BlogPostControl : BaseNopUserControl
    {
        protected override void OnInit(EventArgs e)
        {
            this.BindData();
            base.OnInit(e);
        }
        
        private void BindData()
        {
            pnlError.Visible = false;

            var blogPost = BlogManager.GetBlogPostById(this.BlogPostId);
            if (blogPost != null)
            {
                this.lBlogPostTitle.Text = Server.HtmlEncode(blogPost.BlogPostTitle);
                this.lCreatedOn.Text = DateTimeHelper.ConvertToUserTime(blogPost.CreatedOn, DateTimeKind.Utc).ToString("D");
                this.lBlogPostBody.Text = blogPost.BlogPostBody;
                this.lTags.Text = RenderBlogTags(blogPost);

                if (blogPost.BlogPostAllowComments)
                {
                    if (!BlogManager.AllowNotRegisteredUsersToLeaveComments
                        && (NopContext.Current.User == null || NopContext.Current.User.IsGuest))
                    {
                        lblLeaveYourComment.Text = GetLocaleResourceString("Blog.OnlyRegisteredUsersCanLeaveComments");
                        txtComment.Enabled = false;
                        btnComment.Enabled = false;
                    }
                    else
                    {
                        lblLeaveYourComment.Text = GetLocaleResourceString("Blog.LeaveYourComment");
                        txtComment.Enabled = true;
                        btnComment.Enabled = true;
                    }

                    var blogComments = blogPost.BlogComments;
                    if (blogComments.Count > 0)
                    {
                        rptrComments.DataSource = blogComments;
                        rptrComments.DataBind();
                    }
                }
                else
                    pnlComments.Visible = false;
            }
            else
                Response.Redirect(CommonHelper.GetStoreLocation());
        }

        protected string RenderBlogTags(BlogPost blogPost)
        {
            StringBuilder sb = new StringBuilder();
            var tags = blogPost.ParsedTags;

            if (tags.Length > 0)
            {
                sb.Append(GetLocaleResourceString("Blog.Tags"));
                sb.Append(" ");

                for (int i = 0; i < tags.Length; i++)
                {
                    string tag = tags[i].Trim();
                    string url = SEOHelper.GetBlogUrlForTag(tag);
                    sb.Append(string.Format("<a href=\"{0}\">{1}</a>", url, Server.HtmlEncode(tag)));
                    if (i != tags.Length - 1)
                    {
                        sb.Append(", ");
                    }
                }
            }

            return sb.ToString();
        }
        
        protected void btnComment_Click(object sender, EventArgs e)
        {
            try
            {
                if (Page.IsValid)
                {
                    var blogPost = BlogManager.GetBlogPostById(this.BlogPostId);
                    if (blogPost != null && blogPost.BlogPostAllowComments)
                    {
                        if (!BlogManager.AllowNotRegisteredUsersToLeaveComments
                            && (NopContext.Current.User == null || NopContext.Current.User.IsGuest))
                        {
                            lblLeaveYourComment.Text = GetLocaleResourceString("Blog.OnlyRegisteredUsersCanLeaveComments");
                            return;
                        }
                        string comment = txtComment.Text.Trim();
                        if (String.IsNullOrEmpty(comment))
                        {
                            throw new NopException(GetLocaleResourceString("Blog.PleaseEnterCommentText"));
                        }

                        int customerId = 0;
                        if (NopContext.Current.User != null && !NopContext.Current.User.IsGuest)
                            customerId = NopContext.Current.User.CustomerId;

                        BlogManager.InsertBlogComment(blogPost.BlogPostId, customerId, comment, DateTime.UtcNow);
                        txtComment.Text = string.Empty;
                        BindData();
                    }
                    else
                        Response.Redirect(CommonHelper.GetStoreLocation());
                }
            }
            catch (Exception exc)
            {
                pnlError.Visible = true;
                lErrorMessage.Text = Server.HtmlEncode(exc.Message);
            }
        }

        public int BlogPostId
        {
            get
            {
                return CommonHelper.QueryStringInt("BlogPostId");
            }
        }
    }
}

13 anos atrás
Sorry for so many posts. The top pages are blog, catgegory, and product. If I coudl some hwo tuen thos epages down to use less memory then I think I coudl limp along until I can move hosts.
13 anos atrás
I am just going to move them to rackspace cloud sites. Anyoen use them? Any issues?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.