Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bobi 352 posts 956 karma points
    Apr 04, 2017 @ 03:27
    Bobi
    0

    Umbraco Speed and Back-End Errors

    After a very long weekend trying to deploy a site to a host server and get things working, I noticed two serious issues:

    1) Speed of the site (https://example.com). The site is EXTREMELY slow using the uploaded server side database. On my local machine (localhost with (localdb)\v11.0) the site is not slow. I originally set up the site with SqlCE, but converted it (through migration in webmatrix) to MS Sql Express 2012, and I noticed an immediate speed increase on my local machine running the local db.

    How can I speed up the site? Could this be a web.config issue (web.release.config, web.debug.config issue?)

    Background info:

    I am using Godaddy **shared** hosting to serve the site, and I haven't noticed such slow speeds with the host, so I don't think it's a host issue.
    
    I am running umbraco 7.5.11 (I recently updated from 7.5.10 and used win merge to update any .config files that changed).
    

    2) I am receiving the following server errors every time I login in to the umbraco back end control panel:

    Errors (under Developer tab; and cannot save):

    Authorization error: Unauthorized access to URL: views/components/editor/subheader/umb-editor-sub-header.html

    I get the following errors under health check in the developer tab:

    Authorization error: Unauthorized access to URL: /umbraco/BackOffice/Api/HealthCheck/GetStatus

    Authorization error: Unauthorized access to URL: /umbraco/BackOffice/Api/HealthCheck/GetStatus

    How can I fix this?

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Apr 04, 2017 @ 15:51
    Nicholas Westby
    101

    GoDaddy can be much slower than your local computer. As you have noted, it's shared hosting, meaning you will only get a fraction of the resources (CPU, hard drive reads, network).

    Note that it probably has little to do with the database, supposing the site was built properly (most of the time, Umbraco interacts with the XML cache rather than the database). In the ideal case, you would speed up the code using some caching techniques and best practices (e.g., avoid calling Descendants where possible). You could also consider output caching, though that is less effective on sites that get less traffic (because a page must be visited to be added to the cache).

    It could also be that the deployment setup (e.g., permission issues) are causing enough errors that the website is repeatedly restarting (check your log for indications that your website is restarting a bunch).

    The "authorization error" sounds like you need to set permissions on some of your files (that HTML file is either in the umbraco or umbraco_client folder). Well, that's what it would sound like; the GetStatus URL is for a web method, which should have nothing to do with file permissions. Does your user account have access to all sections of Umbraco?

    By the way, you might consider using a VM (e.g., AWS EC2). It's more expensive, but you'll run into fewer issues and it'll be faster.

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Apr 04, 2017 @ 16:07
    Nicholas Westby
    0

    By the way, I took a look at the pricing, just to check if there is anything comparable to GoDaddy on EC2. GoDaddy costs something like $10/month. You can get EC2 instances for $20-40/month, if you reserve them for at least a year (basically, commit to a year of monthly payments). Take a look at the pricing for reserved instances: https://aws.amazon.com/ec2/pricing/reserved-instances/pricing/

    For quick reference, here's the cost of a t2.small (about $20/month):

    T2 Small

    And here's a t2.medium (about $40/month):

    T2 Medium

    Here's a table that shows how each of these instance sizes perform:

    Windows Performance

    Note that the cost on the right is just for "on-demand" instances (i.e., ones you don't commit to a year for).

    About 2x-4x more expensive than GoDaddy, but will probably solve a lot of your performance and permission issues.

  • Bobi 352 posts 956 karma points
    Apr 04, 2017 @ 16:20
    Bobi
    0

    Thanks Nicholas! I will take a look at it. So for the 2x-4x more cost, I will get a dedicated server instead of a shared server.

    The one thing I was worried about with a dedicated server is maintaining it, so that's why I've avoided a dedicated option :s

    Perhaps they maintain it for you. I am afraid of starting with a command prompt and installing things from there :s

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Apr 04, 2017 @ 16:39
    Nicholas Westby
    0

    Not sure what you mean about the command prompt. You can remote desktop into AWS EC2 instances to install things as if it were your own desktop.

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Apr 04, 2017 @ 16:25
    Nicholas Westby
    0

    What sorts of maintenance are your concerned about? I believe you can configure Windows to install updates automatically (otherwise, you can just pop in there every few months and install them). And you can use Skeddly for backups: https://www.skeddly.com/

  • Bobi 352 posts 956 karma points
    Apr 04, 2017 @ 16:40
    Bobi
    0

    I will check them out! I guess I am concerned about working with the server altogether. I have never dealt with a server at all, and may not have the correct information regarding what is involved; only ones that are maintained and configured for me.

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Apr 04, 2017 @ 16:45
    Nicholas Westby
    0

    This is pretty much all you have to do with the server: https://www.youtube.com/watch?v=iK8YM3JBgwM

    Will be a bit different, as you'll also need to use SQL Server Express, and you'll be using your own files rather than a fresh install of Umbraco, but it's otherwise just as I explain in that video.

  • Bobi 352 posts 956 karma points
    Apr 04, 2017 @ 18:10
    Bobi
    0

    Thanks, I will check out your video and let you know.

    On the godaddy site right now (example.com), I can't even make changes as the admin: I am getting a server error every time I try to save content:

    Server error: Contact administrator, see log for full details. undefined

  • Bobi 352 posts 956 karma points
    Apr 05, 2017 @ 01:27
    Bobi
    0

    Nicholas, just giving an update: I got to the IIS Manager point in the server (adding a site), but I still have to figure out how to add a sql express db. I will then web deploy the sit from web matrix, then use sql manager to export my db to the one I hope to create on the db.

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Apr 05, 2017 @ 04:47
    Nicholas Westby
    0

    Glad to hear you are making progress. For SQL Server Express, simply install it on the web server, then restore a backup of your local database to the server. You'll have to do the usual things (e.g., create a database user for the SQL Server login). I'd also recommend configuring SQL Server to use a limited amount of memory (e.g., half a GB); otherwise, SQL will use all available memory.

    If you don't want to use Web Deploy, you can simply ZIP up the website, copy to the server over the RDP connection, then unzip it.

  • Bobi 352 posts 956 karma points
    Apr 05, 2017 @ 05:16
    Bobi
    0

    Thanks for the note re configuring sql to use a limited amount of memory. I don't know how to do that but will do some investigating.

    Right now I am trying to:

    1) configure sql security settings so that sql can't get compromised (this is a bit over my head)

    2) I will then configure sql to use limited memory (500mb)

    3) figure out how to add a user to IIS (I can't seem to connect to my site through ftp)

    4) determine my sql server connection string

    5) create a db called umbracoDbDSN and then export my localdb info to the server umbracoDbDSN

    6) copy all website files to my site (this seems like the easiest step for me haha because all of the other steps are very new to me!)

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Apr 05, 2017 @ 05:31
    Nicholas Westby
    0

    Most of those steps make sense to me, except for the FTP/IIS user bit. Maybe that's part of Web Deploy?

    Also, keep in mind you can name your database and your server whatever (in the case of the server, I'd just accept the defaults). umbracoDbDSN is just the name of the connection string, and it doesn't have to match anything else.

    Be sure to enable mixed mode authentication on SQL Server (otherwise, you may be unable to connect to the database). It's a step I sometimes forget.

  • Bobi 352 posts 956 karma points
    Apr 05, 2017 @ 05:39
    Bobi
    0

    The FTP/IIS user bit relates to me not being able to ftp into my server with my server address and admin name and password.

    Thanks, I just made it mixed. Do you know of any specific steps to take in order to ensure db security is at its highest? I made the change to the firewall already re the tcp port, but I am unaware of any other steps that are required.

    Also, if there are any security steps to take generally with the server?

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Apr 05, 2017 @ 05:46
    Nicholas Westby
    0

    Some of these may not be quite right, but you can set some folder permissions granularly if you really want to be secure: https://our.umbraco.org/documentation/getting-started/setup/install/permissions

    Also, for SQL Server, full permissions are sometimes necessary (e.g., when installing plugins that add new tables). However, normally, I think something like reader/writer (or whatever they're called) should be sufficient.

    You can use CloudFlare if you want a nice WAF (web application firewall). Does some nice things like prevent DDOS attacks and automatically puts your files on a CDN. Can cause problems (e.g., occasionally messing up images), but you can configure things to avoid those problems. Probably overkill, but if you have the time to set it up then it's useful. There is a free tier.

    In general, I'd recommend taking regular backups. Even with the very best security practices, you can still be compromised. If you have backups, at least you can restore an older version of the site that isn't compromised.

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Apr 05, 2017 @ 05:47
    Nicholas Westby
    0

    Also, install all Windows updates, including the "Recommended" ones (or whatever they're called). There is at least one fix that will make your life much better (fixes an issue where the website restarts or the CPU gets pegged at seemingly random intervals).

  • Bobi 352 posts 956 karma points
    Apr 05, 2017 @ 05:55
    Bobi
    0

    Thanks Nicholas. I will look into the above! I found this article which somewhat helped with securing sql database: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sql/virtual-machines-windows-sql-connect.

    I can't seem to connect to my site in iis (I can't access the site via ip address in the internet browser, nor can I make a simple ftp connection to it even after allowing it in the firewall). I seem to be getting a serious certificate error, even though I uploaded my ssl certificate via IIS using their instructions :s

  • Bobi 352 posts 956 karma points
    Apr 06, 2017 @ 03:49
    Bobi
    0

    Update:

    Things work better on the vps. It's quicker (still slower than I'd like...I'll have to figure that out); I still am getting some issues with packages (they are slow/sometimes fail to load).

    And now, after a couple of days, I got the site up. I just can't figure out connecting the domain to the website...no clue re dns. I have a domain registered at godaddy. I cannot seem to set up dns on the vps.

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Apr 06, 2017 @ 04:09
    Nicholas Westby
    0

    Awesome, you're 99% of the way there.

    In GoDaddy, you'll have to update the DNS entries to point to your server's IP address. Be sure to assign a static IP (I forget what that's called in AWS terms) to your machine, otherwise it may change without notice (which would break your site).

  • Bobi 352 posts 956 karma points
    Apr 06, 2017 @ 22:43
    Bobi
    0

    This DNS business is so confusing. I'm barely hanging on with coding in c# haha. First I thought I would create a DNS on my server, but I'm hitting a wall and starting to pull out hair! Now I'll try to change them on Godaddy's site instead and just leave the domain hosted with godaddy. I don't even know if this makes sense haha.

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Apr 06, 2017 @ 23:40
    Nicholas Westby
    0

    All DNS does is tell web browsers like Chrome the IP address to use for a given domain name. This is typically done in something like GoDaddy (it would be a very advanced scenario to have a setup in which you configure this on one of your servers).

    DNS has different types of records (e.g., CNAME records, A records). The short version is that you'l likely want to change the A record (which likely already exists) to the new IP address. If you have issues, feel free to post a screenshot and we can give you some more tips.

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Apr 07, 2017 @ 00:29
    Nicholas Westby
    0

    By the way, once you update a DNS record, it may take some time to propagate (possibly several days).

    Also, browsers sometimes cache the DNS info too. You can clear this DNS cache in Chrome like this: http://www.redsome.com/flush-clear-dns-cache-google-chrome-browser/

    Though, keep in mind that it may still take some time for the DNS to propagate even if you clear your own cache. In GoDaddy, you can check the TTL for the DNS to see how long you can expect it to take.

  • Bobi 352 posts 956 karma points
    Apr 07, 2017 @ 16:19
    Bobi
    0

    Thanks Nicholas! What I did was made a new A record pointing to my server ip address. Still is not up, but perhaps it's propagating.

    I originally thought I had to point the A record to my IP address and the specific site port, but it wouldn't let me. In IIS I made the host the domain: www.thedomain.com. When I click on preview in IIS it has https://thedomain.com/port#, which I found a bit peculiar.

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Apr 07, 2017 @ 16:42
    Nicholas Westby
    1

    That is strange that the preview link in IIS is using the apex domain rather than the www subdomain. Did you configure both the apex domain and the www as bindings for the website? That would explain some things.

    Also, are you expecting your site to be available at both www.thedomain.com AND thedomain.com? If so, I'd recommend creating a redirect from one to the other (if the site is available at two different domains, that negatively impacts SEO).

    Also, I see one of your links mentions HTTPS and a port (though, the port is apparently after a slash rather than after a colon, which is in itself very strange). If the site is available via HTTPS, you will need to add additional bindings in IIS (in addition to installing an SSL certificate). You will probably also want to create a redirect from HTTP to HTTPS.

    Also, regarding the port. I'm assuming it's a typo and you actually meant https://thedomain.com:port/. And I'm assuming that port is either 80 or 443. 80 is the default port for HTTP and 443 is the default port for HTTPS. If those defaults are used, the user does not see the port when they visit your site. In other words, http://thedomain.com:80/ is the same as http://thedomain.com/ and https://thedomain.com:443/ is the same as https://thedomain.com/.

    Keep in mind also that if you want both thedomain.com and www.thedomain.com to point to your server, you will have to create A records in your DNS (in GoDaddy) for both of those domains (i.e., the apex domain and www subdomain).

    FYI, you are correct that you do not point A records to port numbers. You point them to the IP address without the port number.

  • Bobi 352 posts 956 karma points
    Apr 07, 2017 @ 20:28
    Bobi
    0

    Thanks Nicholas, I will have to make some changes based on this info. It was a typo by the way; I meant to use a colon in front of the port number.

    IIS points to https://myIPAddress:portNumber/. I changed the port number to a custom one for http and https (and allowed the rules in firewall; although http doesn't yet work). My site shows up there, but not at the http (I must have some type of https block or something somewhere).

    I will look up a way to block my custom ports from being seen by the user (hope it's not too involved).

    I already installed the SSL, but it doesn't work yet (I think because the domain name isn't properly set up at the moment).

    I will make other changes as suggested. :)

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Apr 07, 2017 @ 20:35
    Nicholas Westby
    1

    FYI, I'm not sure you can set a default port in the browser. My guess is HTTP must use 80 and HTTPS must use 443. Otherwise, the user would have to specify the port.

    By the way, if you want to test the setup before DNS propagates, you can modify your local hosts file so that it points the DNS to the IP address of your server. The hosts file is basically a local DNS. Keep in mind you may still have to clear your DNS cache in your browser after modifying the hosts file.

  • Bobi 352 posts 956 karma points
    Apr 08, 2017 @ 06:39
    Bobi
    1

    Hi Nicholas,

    Thank you so much for all of the assistance. I can't even explain to you how much it has helped!

    The site is finally up! I didn't even have to insert a host in the bindings of iis. I guess I must've written something early on re that in the web.config.

    Thanks again. I can't tell you how much it has helped! You're awesome.

  • Bobi 352 posts 956 karma points
    Apr 11, 2017 @ 03:14
    Bobi
    0

    Hi again Nicholas,

    I posted a new issue here: https://our.umbraco.org/forum/using-umbraco-and-getting-started/85106-css-and-js-minification-issues regarding CSS and JS Minification issues on the server, which never appeared on my local machine.

    I was thinking it has something to do with a configuration that I do not have on my server, but have on my local machine.

    Any ideas?

  • Niels Hartvig 1951 posts 2391 karma points c-trib
    Apr 07, 2017 @ 06:16
    Niels Hartvig
    8

    You could also just use Umbraco Cloud (roughly $25 / month) - then you wouldn't have had to fight with all this nor in the future. You'd also get a workflow for moving Umbraco assets back and forward between your machine and your production site, automated upgrades, Umbraco Forms for free and much more.

    At the same time you're supporting the continuous development of the Umbraco project rather than throwing your money at ISPs - epic win :-)

    More info here: https://umbraco.com/products/umbraco-cloud/

    /n

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Apr 07, 2017 @ 15:16
    Nicholas Westby
    1

    Indeed, Umbraco Cloud could make a lot of things easier (though it introduces some of its own complexities). However, I'm not sure it would be solve Bobi's issues (I'm also not sure it wouldn't).

    For one, what sort of resources are dedicated to the instance at the €25/starter level? That is, CPU, hard drive speed, and RAM (and I suppose network bandwidth, though I don't usually run into that as a bottleneck)? Remember, this all started because of GoDaddy's shared hosting environment that offers very little in terms of resources. It'd be curious to know how Umbraco Cloud compares to, say, the t2.small EC2 instance above (i.e., 1 CPU, 2GB RAM, moderate hard drive speed with options to attach more optimized storage).

    If the resources on the Umbraco Cloud instances are found to be insufficient, is there an option to upgrade the instance (paying more, of course) for extra resources?

  • Bobi 352 posts 956 karma points
    Apr 07, 2017 @ 16:22
    Bobi
    0

    Yes, exactly, I looked at Umbraco cloud, but was not clear about the instance upgrading option, nor the specs.

  • Paul Wright (suedeapple) 277 posts 704 karma points
    Apr 07, 2017 @ 17:57
    Paul Wright (suedeapple)
    1

    There's no year long obligation with Umbraco Cloud - Just give it a whirl and see how your site performs.

    The great thing about Umbraco Cloud is you dont have to worry about shared databases, and slow DB Connections.

    When you are devving you are using a local instance of SQLCE, and you just need to push your changes to live. Everything is nice and quick.

    If you need more resources, or have a "bigger site" - Then surely, thats a good problem to be in (have), as you'll surely have bigger ££££££ to pay for a proper IT network technician.

    Until that problem/day arises - Stick with Umbraco Cloud.

    Infact, I can't live without it anymore. It's just too darn good.

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Apr 07, 2017 @ 19:07
    Nicholas Westby
    0

    That sounds good in theory and I suspect holds true much of the time, but doesn't really seem to apply in this case (given that performance issues have already been identified).

    It's also worth clarifying that AWS EC2 similarly does not require a year obligation. You can pay a few cents a minute for testing, then get a cheaper rate if you decide the performance is sufficient and you are willing to commit to a year.

    I am excited to one day use Umbraco Cloud, but for this particular issue being discussed, it doesn't necessarily seem all that appropriate.

Please Sign in or register to post replies

Write your reply to:

Draft