Ticket

Orchard CMS Slow Performance issue

Hi all, I have deployed orchard cms site into godaddy server.

Based on the behavior I'm seeing, this seems likely to be the problem. I get a slow initial load time but if I come back in right after, things load quickly. I'm going to try the application warm-up suggestion mentioned on the Orchard discussion board. - thanks.

An every hour once will get slowness. After trigger the first time, right after will get fast.

Re: Orchard CMS Slow Performance issue

Shared hosting, and GoDaddy in particular, tends to have low available memory, and experience frequent teardowns of appdomains, causing the app to have to cold-start frequently. In other words, if you want decent performance, you should get decent hosting. You'll probably get a much better experience, while keeping costs down, with a specialized hosting solution such as Lombiq's DotNest.

Tuesday, August 16, 2016 10:03:37 PM bybleroy
  • bleroy
  • Lv. 08 Rookie
  • Total EXP: 527

Re: Orchard CMS Slow Performance issue

Just for infos, for some sites on azure websites with a shared account, i use a background task to ping the site periodically. It works fine on azure websites but not sure on godaddy. So here as an example where the site baseUrl is used (so you need to correctly set it in your site settings).

using Orchard.Environment.Extensions;
using Orchard.Settings;
using Orchard.Tasks;
using System;
using System.IO;
using System.Net;
using System.Web;

namespace Evolutive.Automation.Tasks {
[OrchardFeature("Evolutive.KeepAlive")]
public class KeepAlive : IBackgroundTask {
    private readonly ISiteService _siteService;

    public KeepAlive(ISiteService siteService) {
        _siteService = siteService;
    }

    public void Sweep() {
        var baseUrl = _siteService.GetSiteSettings().BaseUrl;

        if (!string.IsNullOrEmpty(baseUrl) && Uri.IsWellFormedUriString(baseUrl, UriKind.Absolute)) {
            var url = VirtualPathUtility.AppendTrailingSlash(baseUrl) + "keepalive";

            try {
                var request = WebRequest.Create(url) as HttpWebRequest;
                if (request != null) {
                    request.Timeout = 5000; request.KeepAlive = false; request.ReadWriteTimeout = 1000;
                    using (HttpWebResponse response = request.GetResponse() as HttpWebResponse) { }
                }
            }
            catch { }
        }
    }
  }
}

NOTE: i also add "keepalive" to the url because i have a specific controller action which only returns a little text content.

Best

Thursday, August 18, 2016 12:48:49 AM byjtkech
  • jtkech
  • Lv. 13 Rookie
  • Total EXP: 1028

Re: Orchard CMS Slow Performance issue

@jtkech - hey mate, forgive my ignorance, but was there a reason why you opted for the above and not the 'old' Keepalive module available in the Gallery? I ask, for that's what I use and was not aware of any issues - but perhaps there is? Thanks for the great info as always, Pug

Thursday, August 18, 2016 6:48:02 AM bypug
  • pug
  • Lv. 04 Rookie
  • Total EXP: 144

Re: Orchard CMS Slow Performance issue

@pug, i don't remember the details, maybe because of some drawbacks with azure 3 years ago where the processing time was exceeding the limits, but maybe an azure issue which is now fixed ... So i think the Keepalive module, where you can define the ping url in settings, is still good to use.

Maybe good to use a request.Timeout to prevent from waiting a too long time in some cases. Regarding the Keepalive module, it uses record storage, so i would change it to use infoset storage without having to define a content part record, nothing to add in migrations ...

Best

Thursday, August 18, 2016 11:21:17 PM byjtkech
  • jtkech
  • Lv. 13 Rookie
  • Total EXP: 1028

Post a reply

You need to be signed in to post a reply.

Sign In