view the website - strange things in Google Maps and Google Earth View the Map
 


Server issues

Filed under: mapofstrange.com — Paul March 5, 2008 @ 12:28 pm

The success of mapofstrange.com has caused no end of problems! Every host it’s been on over the past year has told us where to go. We’ve been told in no uncertain terms to move to a different host or sign up for a dedicated server. The problem is that it keeps bringing the server down, which isn’t exactly pleasant for other people who are being hosted on that server…

We recently migrated to a VPS (Virtual Private Server), which essentially means that we’ve got full control over the hosting of the site - if the server goes down it’s up to us to fix it. Unfortunately, the server has been going down. A lot. Every couple of days the site just dissappears. What had happened was that Apache had somehow managed to fall over. The fix for this was relatively straightforward. A simple cron job running every minute of every day checks to see if the site is running and if it isn’t, it restarts Apache.

The script that does this is a python script -

import httplib, os
try:
  conn = httplib.HTTPConnection(”www.mapofstrange.com”)
  conn.request(”GET”, “/index.php”)
  r1 = conn.getresponse() #can it get a response from mapofstrange.com

except:
  #Restart Apache
  try:
  os.system(’sh /etc/init.d/httpd restart’)
  print “Apache restarted successfully”

except:
  print “Failed to restart Apache”

This does a quick check (using httplib) to see if it can connect to the server. If it can’t it simply trys to restart Apache. You can also set it up to restart other services like MySQL (os.system('sh /etc/init.d/mysql restart') ). We’re lucky that we’ve got cpanel running, as it provides us with these scripts to restart essential services under etc/init.d.  We saved this onto the server, then setup the cron job to run this script every minute. To get the cron job to work, we simply added the following line to the root cron file under /var/spool/cron in my file system.

* * * * * python /tmp/restart.py

We also got it to email us the results, so we know when it’s gone down and how quickly it managed to restart.

The site/server still goes down (probably about once a day), but it’s only ever down for a minute (or two if there is a serious problem). This really simple solution means that we don’t have to concern ourselves with server admin on a regular basis - the biggest issue is automatically taken care of by the system itself.



Down Time 2

Filed under: mapofstrange.com — Paul September 10, 2007 @ 12:41 pm

Well I’ve finally found out why the site went down and the simple answer is … Digg.com.  The site became popular and has (so far) got almost six hundred Diggs.  This in itself increased traffic massively to the site, but if I’m being honest shouldn’t have caused the site to be taken down - it was well under the 2000GB a month limit (the most it’s ever got in a day was 1.6GB).  The problem was (I think) some of the less efficient code I was using (namely the code providing the comments).  As mentioned in a previous post, I’ve removed these scripts and it all seems tickety boo. 

In my opionion, some of the comments on Digg were a little unfair towards my hosts.  Of course, it’s incredibly frustrating when a site is taken down by a host, but it really isn’t the end of the world.  This is not a commercial website, and I’m not going to fork out hundreds of dollars a month to put it on a dedicated server - that really would be overkill.  Some might challenge the fact that it isn’t commercial because of the adverts - I’ve added these in an attempt to cover the cost of hosting (and maybe get myself a couple of CDs when the cheque comes through), but really the income generated by the site is peanuts.  I’ve gone with my host’s economy package which is less than $3 a month, but provides much more bandwidth and storage than this site requires (now and for the foreseeable future).  However, for $3 you don’t expect them to be too pleased when someone is using a lot more than their fair share of the server load.  At the moment I am reasonably happy with the hosting, but if I get some more Diggs I might be forced to reconsider.  In the meantime I have made some changes to lighten the mapofstrange.com load on the webhostingbuzz servers, which were highlighted in my previous post.



Down Time

Filed under: mapofstrange.com — Paul September 4, 2007 @ 11:53 am

As regular visotors may be aware, the website was down for a few days at the end of August and start of September. We are really sorry for any inconvenience this caused. The downtime was caused by increased traffic over a 48 hour period.  Basically, the number of visitors suddenly doubled in the space of a couple of days and we were taking up too much of the CPU on our host’s servers. 

To combat this issue we’ve had to make some changes to the site to make things a little bit more efficient.  The following changes have been made:

  1. We’ve had to disable the comments for the time being.  Our stats showed that the comments scripts were being called an average of eight times more than the homepage, and although this might be a sign of their popularity we’ve had to make the difficult decision to remove them for the sake of the website as a whole.  Don’t worry if you’ve previously added a comment - these are safe, and we are currently working on a more efficient method of displaying them.
  2. To put more emphasis on the client side (you) rather than the server side (us), we’ve also made the map show 30 rather than 25 markers. This will mean that the page will take a little longer to load, but won’t put quite as much pressure on the server (hopefully).  To be honest, this is a guess, and it might work in the opposite way - we’ll just have to keep our eyes on the stats - so if it’s down to 10 markers at the end of this week, you’ll know why! *** Amendment *** - We’ve made it 20 markers on a page.  That’s because we have a large number of visitors who load up the map once and then don’t bother going any further.  By making this reduction, these people mean that we’re actually putting less traffic through the server
  3. The Google Homepage tool was viewed more than a million times during August (seriously).  This in itself has created more than a gigabyte’s worth of traffic on the server.  Due to this popularity we couldn’t possibly remove this feature, so we’ve scaled it down instead - it now shows the latest 10 markers rather than the latest 20.  That means that the script which generates the markers is only half the size that it would be normally, meaning that we can have more page views for less bandwidth.
  4. The news section doesn’t list as many items on the front page - it now shows three as opposed to five, meaning that the page isn’t quite as big.

So lets keep our fingers crossed that this fixes the site and we don’t suddenly get taken down again. If anyone can provide a (very) cheap dedicated server, we’d be delighted to hear from you.



Biplane spotted in New York City

Filed under: mapofstrange.com — Paul July 12, 2007 @ 1:22 pm

This week’s best post award goes to the Rooftop of 77 Water Street, New York City.  Thanks to ‘Shep’ for telling us about it. 

On the top of this building, there is a Bi-plane, complete with landing strip!

plane_on_roof.png

Surely a plane couldn’t possibly land on such a small runway?  Wouldn’t it be dangerous?

 Well, that’s the point.  It isn’t a real plane - it’s a full size replica of a Sopwith Camel, a British plane used in the First World War (WWI).  The model was designed in the late 60’s and was added to the building to ‘amuse’ residents of other, taller skyscrapers nearby like the WTC.

 Have a look on Google for ‘77 Water Street’, or ‘plane on roof New York’ - there is loads about it on the web.



Idiots of the week

Filed under: mapofstrange.com — Paul July 6, 2007 @ 1:58 pm

 I thought it would be nice to highlight each week the best things that people have added, and then I thought that it might be cool to have a laugh at some of the worse things that have been put on the site.  I’ve already started with the first part of this (marker of the week), and this is the first entry of the second part - the worse things. 

 I’ve had two main problems with this, and surprisingly, it isn’t finding rubbish to talk about - it’s been choosing between the hundreds of poor entries that have been added.  And the second problem was thinking of a name.  I didn’t want it to be insulting, but I wanted it to make it obvious that I didn’t really think these things were very good.  So I’ve ignored the first criteria, and chosen to call this ‘Idiots of the Week’.

 The first idiot is this one - What???  Where?  How can you see people’s faces and clothes?  I don’t understand…

iow3.png

The second idiot is this one - so daft he named it twice… 

iow10b.png 

iow10.png 

It’s blurred and uninteresting.  That is all there is to say - why he felt the need to add it again I don’t know.

The final idiot is a classic.  I think he added this because he had read the blurb on the site about people doing this sort of thing and added this for a laugh.  At least I hope so.

iow7.png

Yes.  Mexico.  In the Atlantic Ocean, just of the African Coast.  Actually it’s almost at grid reference 0,0 which is cool, but it isn’t Mexico…



<<< Previous Page - Next Page >>>