will.thoughts.pop
RSS icon Email icon Home icon
  • Seen on a list recently

    Posted on June 22nd, 2008 Will 1 comment

    Remember, top-posting because that’s where the cursor happened to be is like shitting in your pants because that’s where your arsehole happened to be.

  • Q. Does GTA San Andreas work on a MacBook Pro using WinXP and Boot Camp?

    Posted on June 13th, 2008 Will No comments

    A. Yes it does, perfectly and at the highest detail level.

  • This is going to take a while…

    Posted on June 12th, 2008 Will 4 comments

  • Flushing memcached servers the easy way

    Posted on June 10th, 2008 Will 7 comments

    This is easy right?  Can’t you just restart the memcached server? Well yes, but you may cause errors in applications that are already connected to it. You can follow your memcached restart with an application restart, eg for a Ruby on Rails app:

    # /etc/init.d/memcached restart && mongrel_rails cluster::restart

    Of course if you have more than one application server you have to restart your app on every single one. This would work on an engineyard slice assuming you have the eycap gem installed:

    $ cap production memcached:restart
    $ cap production mongrel:restart

    Restarting your application is not ideal however, you will lose anything cached in memory, cause delays to users trying to access your site, that sort of thing.

    So what can be done? The answer is really simple. Assuming a memcached running on the local machine on the default port:

    $ echo ”flush_all” | nc localhost 11211

    Easy!