Monitoring Performance with Digital Ocean

Performance is the most important thing when it comes to your website. A lot of people say it’s the content, but a poor performing website will see users leaving in their droves if the load times are too slow (although they wouldn’t be going there in the first place if it weren’t for the content, so I see an argument against that too).

Please note this is an ongoing article. I’m blogging as I build, so expect a lot of updates as I progress.

Once Graphite is set up you can apply a prettier frontend by installing and configuring Grafana.

On your webserver download the latest version of grana


Next you need to unzip the .tar.gz file

tar -xvzf community_images.tar.gz

Now you need to copy the folder to your web root to access the interface. During the graphite installation you copied some details to /etc/apache2/sites-available, this is

Afterwards I found you also need to download and run Elastic Search, instructions I found here

While I was trying to add cross scripting capabilities I received an error about HEADERS not being available. By default the headers module is excluded from Apache so the following line fixed that for me

a2enmod headers

Installing the chrome drivers I used the first part of this tutorial

… at least until it arrived at the install phantomjs (which should have already been done previously).

Common Issues

Here are some common issues I ran into during the configuration of this. command not found

Each time I log back into the server to run I get the following error command not found

To overcome this you need to run

nvm use v0.10.33

which kickstarts node into use and allows you to run

After installing google chrome as per the instructions I was having trouble with running the command sudo apt-get update. After a bit of searching I found that there were duplicate entries in /etc/apt/sources.list.d/ for google.list and google-chrome.list, so I removed the entry for sudo rm google-chrome.list. This article explains the full process for getting this working again.

info: Starting proxy on port 9092, will wait at most 15000 ms

I’m getting the following error after rebooting my Ubuntu Digital Ocean server

info: Starting proxy on port 9092, will wait at most 15000 ms

I was getting this issues when running -f urls.txt -b chrome,firefox --memory 16 --screenshot --profile mobile --viewport 480x320

The -b chrome,firefox seems to be causing the issue. After I removed this it worked fine.

Getting frequent peformance monitorin

This may not be the best way to do this… but I wanted to get reports on the site I was working on every 60 seconds. To get this done I ran the following command while on the Ubuntu commandline

while true; do -f urls.txt --memory 32 --name "Demo" --graphiteHost localhost; sleep 60; done

1 comment

Leave a comment

Your email address will not be published. Required fields are marked *