• Home
  • Personal
  • Tech
  • Politics
  • Photography
  • Maintenance pages status codes and Lighttpd

    January 10th, 2007

    I’ve noticed a few very broken maintenance page Lighttpd config examples around, including the one on the mod_magnet documentation page. They all manage to display the maintenance page ok, but they return a HTTP 200 status code to the client, rather than the more appropriate HTTP 503 code.

    As with all 500 status codes, the 503 code is an error code but it signifies a temporary error. The client should try again later (in fact you can specify how much later using the Retry-After header).

    A 200 code tells the client everything is normal and OK. So the user gets your nice maintenance page telling them of a temporary outage, whereas their browser gets told that everything is fine. Now this might not be a problem for a user, but if the client is a search engine or a caching proxy then it will assume the maintenance page is the new valid content for the request.

    If the Google crawler hits your site when you have the maintenance page up, it will update its search index with your “we’re down for now” message, rather than your cash prizes blog content. Your page rank will drop, your fat Adsense cheque will diminish and you’ll have to go back to your regular nine to five job in the city with people you don’t like in clothes you hate wearing.

    So, as you can see, it’s important to return the correct status code. Here’s how to do it with Lighty and mod_magnet:

    Read the rest of this entry »

    Tags: deployment, error, google, http, lighttpd, lua, mod_magnet

    Posted in GNU/Linux, Networks and Firewalls, Tech | 1 Comment »

  • High performance Wordpress

    June 5th, 2006

    Of all the Wordpress installations I manage, two of them bring in a rather large number of hits.

    To speed up Wordpress I usually just enable the MySQL query cache and install the eaccelerator PHP opcode cacher. On one particular box, an Intel 1.3Ghgz PIII this increased performance from around 3 requests per second to around 10.

    Recently I came across the WP-Cache plugin for Wordpress. This takes the finished output from any given wordpress request and caches it to disk, serving directly from the static cache for the next hour (configurable). Any new posts or comments in the mean time immediately mark the cached version stale, so you don’t need to wait around for an hour.

    On the same hardware and blog, this increases performance from 10 requests per second to over 250. A 2500% increase in speed.
    Read the rest of this entry »

    Tags: benchmark, cache, eaccelerator, lighttpd, lua, mod_cml, mysql, performance, speed, wordpress, wp-cache

    Posted in Tech | No Comments »

  • John Leach

    • John Leach is a human being living in Leeds, UK.
  • Twitter

    • John Lily met @davidsmalley and one of his dogs Tess today and we had beers and burgers. Dogs had walks and treats, and Tess had my coleslaw 15 hrs ago
    • More twitter updates →
  • Author Stuff

    • Brightbox Rails Hosting
    • Compost This
    • ELER Web Comic
    • New World Odour
    • News Sniffer
    • Photography
    • Profile and History
    • Recycle This
    • The Gillroyd Parade
    • Things to do today
    • Website
  • Friends

    • Caius Durling
    • Deb Bassett
    • Gianni Tedesco
    • Ian Higgins
    • Louisa Parry
    • Rahoul Baruah
    • Sleepy Kev
    • Tim Waters
    • Tom Hall
  • Stuff

    • ifup
    • Media Lens
    • Mia Bambina
    • News from nowhere
  • Meta

    • Log in
    • Entries RSS
    • Comments RSS
  • Search

Creative Commons License The text of this blog is licensed under the Creative Commons BY-ND license