<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: WhatDoTheyKnow growing pains (and Ruby memory leaks)</title>
	<atom:link href="http://www.mysociety.org/2009/09/17/whatdotheyknow-growing-pains-and-ruby-memory-leaks/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysociety.org/2009/09/17/whatdotheyknow-growing-pains-and-ruby-memory-leaks/</link>
	<description>Relentless user-focus on civic websites</description>
	<lastBuildDate>Fri, 10 Feb 2012 01:00:32 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
	<item>
		<title>By: Francis Irving</title>
		<link>http://www.mysociety.org/2009/09/17/whatdotheyknow-growing-pains-and-ruby-memory-leaks/comment-page-1/#comment-131790</link>
		<dc:creator>Francis Irving</dc:creator>
		<pubDate>Thu, 11 Feb 2010 00:51:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysociety.org/?p=2982#comment-131790</guid>
		<description>I decided to try Ruby on Rails, mainly because I hoped it would make it easier for other people to contribute code. This is because it has a standard file structure, and way to run the code.

PHP/MySQL applications are very hard for people to configure and get going. e.g. No standard way for database migrations etc.

Yes, I could have used Cake or Django - but 2.5 years ago they weren&#039;t as obvious a choice as trying Rails. I think it was a good choice. I&#039;ve learnt a lot about frameworks from using Rails. I don&#039;t think it is especially good, but then again I haven&#039;t found anything I think is better (Django is in some ways, not in others).

In practice, it hasn&#039;t created more code contributions. Partly the Rails app is still hard to install (getting example data, setting up Xapian and various other bits). Partly it is just had to get code contributions to web applications.</description>
		<content:encoded><![CDATA[<p>I decided to try Ruby on Rails, mainly because I hoped it would make it easier for other people to contribute code. This is because it has a standard file structure, and way to run the code.</p>
<p>PHP/MySQL applications are very hard for people to configure and get going. e.g. No standard way for database migrations etc.</p>
<p>Yes, I could have used Cake or Django &#8211; but 2.5 years ago they weren&#8217;t as obvious a choice as trying Rails. I think it was a good choice. I&#8217;ve learnt a lot about frameworks from using Rails. I don&#8217;t think it is especially good, but then again I haven&#8217;t found anything I think is better (Django is in some ways, not in others).</p>
<p>In practice, it hasn&#8217;t created more code contributions. Partly the Rails app is still hard to install (getting example data, setting up Xapian and various other bits). Partly it is just had to get code contributions to web applications.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mathew Anderson</title>
		<link>http://www.mysociety.org/2009/09/17/whatdotheyknow-growing-pains-and-ruby-memory-leaks/comment-page-1/#comment-131764</link>
		<dc:creator>Mathew Anderson</dc:creator>
		<pubDate>Wed, 10 Feb 2010 22:22:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysociety.org/?p=2982#comment-131764</guid>
		<description>Is it possible to give the reason for using Ruby for this DB ? for example could you not have used php mysql ?
Was there a special reason for using Ruby ? for a production site as this.</description>
		<content:encoded><![CDATA[<p>Is it possible to give the reason for using Ruby for this DB ? for example could you not have used php mysql ?<br />
Was there a special reason for using Ruby ? for a production site as this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Mullany</title>
		<link>http://www.mysociety.org/2009/09/17/whatdotheyknow-growing-pains-and-ruby-memory-leaks/comment-page-1/#comment-113953</link>
		<dc:creator>Michael Mullany</dc:creator>
		<pubDate>Tue, 06 Oct 2009 16:55:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysociety.org/?p=2982#comment-113953</guid>
		<description>Francis,

You should read:

http://www.engineyard.com/blog/2009/thats-not-a-memory-leak-its-bloat/

And definitely reach for New Relic or Scout.

-- michael</description>
		<content:encoded><![CDATA[<p>Francis,</p>
<p>You should read:</p>
<p><a href="http://www.engineyard.com/blog/2009/thats-not-a-memory-leak-its-bloat/" rel="nofollow">http://www.engineyard.com/blog/2009/thats-not-a-memory-leak-its-bloat/</a></p>
<p>And definitely reach for New Relic or Scout.</p>
<p>&#8211; michael</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Francis Irving</title>
		<link>http://www.mysociety.org/2009/09/17/whatdotheyknow-growing-pains-and-ruby-memory-leaks/comment-page-1/#comment-112895</link>
		<dc:creator>Francis Irving</dc:creator>
		<pubDate>Wed, 30 Sep 2009 23:12:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysociety.org/?p=2982#comment-112895</guid>
		<description>Thanks Charles for that vote for trying JRuby. I think I&#039;m unnecessarily put off because I&#039;m not used to Java (from the days when it wasn&#039;t open source, so didn&#039;t have nice Debian packages).

I&#039;m also worried that it&#039;ll be hard to set up an environment as nice as mod_ruby (e.g. running Rails as a particular Unix user).

I&#039;ll give it a go if I get stuck again in future!</description>
		<content:encoded><![CDATA[<p>Thanks Charles for that vote for trying JRuby. I think I&#8217;m unnecessarily put off because I&#8217;m not used to Java (from the days when it wasn&#8217;t open source, so didn&#8217;t have nice Debian packages).</p>
<p>I&#8217;m also worried that it&#8217;ll be hard to set up an environment as nice as mod_ruby (e.g. running Rails as a particular Unix user).</p>
<p>I&#8217;ll give it a go if I get stuck again in future!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Oliver Nutter</title>
		<link>http://www.mysociety.org/2009/09/17/whatdotheyknow-growing-pains-and-ruby-memory-leaks/comment-page-1/#comment-112312</link>
		<dc:creator>Charles Oliver Nutter</dc:creator>
		<pubDate>Sat, 26 Sep 2009 20:46:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysociety.org/?p=2982#comment-112312</guid>
		<description>You really should try JRuby just to see if it solves your memory issues. We make much more efficient use of memory than the standard implementation, and there are sites running JRuby on multi-GB heaps without any issues.</description>
		<content:encoded><![CDATA[<p>You really should try JRuby just to see if it solves your memory issues. We make much more efficient use of memory than the standard implementation, and there are sites running JRuby on multi-GB heaps without any issues.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Francis Irving</title>
		<link>http://www.mysociety.org/2009/09/17/whatdotheyknow-growing-pains-and-ruby-memory-leaks/comment-page-1/#comment-110842</link>
		<dc:creator>Francis Irving</dc:creator>
		<pubDate>Fri, 18 Sep 2009 14:53:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysociety.org/?p=2982#comment-110842</guid>
		<description>Dave - I agree that the weak Ruby virtual machine was a large cause of my troubles. I&#039;m not totally convinced the debugging tools for Perl, Python or PHP are substantially better than Ruby, even if they are slightly better. Certainly we had lots of trouble in the early days with, say, FastCGI and those languages.

Perhaps what I was trying to say was that things could be better organised across LAMP-style stacks in general. At the moment for such stacks there are lots of adhoc programs wired together that you can sort of debug things with. I&#039;d like a stable platform that tells you simply exactly the information you need to know.

Peter - We&#039;re using Xapian and acts_as_xapian. I wrote the latter for WhatDoTheyKnow, because acts_as_solr wasn&#039;t good enough. Details in this blog post http://www.mysociety.org/2008/07/17/acts_as_xapian/ - the Ruby Xapian bindings did cause problems with Passenger&#039;s spawning model, which we had to make conservative. It doesn&#039;t seem to cause memory trouble though (Xapian doesn&#039;t allocate much memory, it uses memory mapped files and relies on the kernel for in-RAM speed caching).

Dan - Django was not as clearly good 2 years ago when we started writing WhatDoTheyKnow, although it is what I&#039;d use if I started again now. Rails was genuinely innovative, and well marketed with a community that has lots of good things about it. On the other hand I think Ruby, Rails, and 3rd party libraries and tools are in general much more poorly software engineered than the Python equivalents.

Obviously we&#039;re not going to rewrite it now. That would be a crazy waste of time (second systems effect). It might look like a simple website, but inside it is surprisingly complicated - there is lots going on that happens invisibly. And lots and lots of slowly accumulated knowledge now embodied in the source code.</description>
		<content:encoded><![CDATA[<p>Dave &#8211; I agree that the weak Ruby virtual machine was a large cause of my troubles. I&#8217;m not totally convinced the debugging tools for Perl, Python or PHP are substantially better than Ruby, even if they are slightly better. Certainly we had lots of trouble in the early days with, say, FastCGI and those languages.</p>
<p>Perhaps what I was trying to say was that things could be better organised across LAMP-style stacks in general. At the moment for such stacks there are lots of adhoc programs wired together that you can sort of debug things with. I&#8217;d like a stable platform that tells you simply exactly the information you need to know.</p>
<p>Peter &#8211; We&#8217;re using Xapian and acts_as_xapian. I wrote the latter for WhatDoTheyKnow, because acts_as_solr wasn&#8217;t good enough. Details in this blog post <a href="http://www.mysociety.org/2008/07/17/acts_as_xapian/" rel="nofollow">http://www.mysociety.org/2008/07/17/acts_as_xapian/</a> &#8211; the Ruby Xapian bindings did cause problems with Passenger&#8217;s spawning model, which we had to make conservative. It doesn&#8217;t seem to cause memory trouble though (Xapian doesn&#8217;t allocate much memory, it uses memory mapped files and relies on the kernel for in-RAM speed caching).</p>
<p>Dan &#8211; Django was not as clearly good 2 years ago when we started writing WhatDoTheyKnow, although it is what I&#8217;d use if I started again now. Rails was genuinely innovative, and well marketed with a community that has lots of good things about it. On the other hand I think Ruby, Rails, and 3rd party libraries and tools are in general much more poorly software engineered than the Python equivalents.</p>
<p>Obviously we&#8217;re not going to rewrite it now. That would be a crazy waste of time (second systems effect). It might look like a simple website, but inside it is surprisingly complicated &#8211; there is lots going on that happens invisibly. And lots and lots of slowly accumulated knowledge now embodied in the source code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://www.mysociety.org/2009/09/17/whatdotheyknow-growing-pains-and-ruby-memory-leaks/comment-page-1/#comment-110839</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Fri, 18 Sep 2009 14:37:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysociety.org/?p=2982#comment-110839</guid>
		<description>1 Comment: Dump Rails, try Django.</description>
		<content:encoded><![CDATA[<p>1 Comment: Dump Rails, try Django.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Morris</title>
		<link>http://www.mysociety.org/2009/09/17/whatdotheyknow-growing-pains-and-ruby-memory-leaks/comment-page-1/#comment-110817</link>
		<dc:creator>Peter Morris</dc:creator>
		<pubDate>Fri, 18 Sep 2009 10:29:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysociety.org/?p=2982#comment-110817</guid>
		<description>Are you using ferret for the search side?
I have seen that ferret can be very memory hungry and using the ferret gem in a rails app can make it bloat out.</description>
		<content:encoded><![CDATA[<p>Are you using ferret for the search side?<br />
I have seen that ferret can be very memory hungry and using the ferret gem in a rails app can make it bloat out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Page</title>
		<link>http://www.mysociety.org/2009/09/17/whatdotheyknow-growing-pains-and-ruby-memory-leaks/comment-page-1/#comment-110809</link>
		<dc:creator>Dave Page</dc:creator>
		<pubDate>Fri, 18 Sep 2009 09:08:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysociety.org/?p=2982#comment-110809</guid>
		<description>I&#039;m not sure why you claim this is a disaster for Perl, Python, PHP and other free software languages...</description>
		<content:encoded><![CDATA[<p>I&#8217;m not sure why you claim this is a disaster for Perl, Python, PHP and other free software languages&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Francis Irving</title>
		<link>http://www.mysociety.org/2009/09/17/whatdotheyknow-growing-pains-and-ruby-memory-leaks/comment-page-1/#comment-110715</link>
		<dc:creator>Francis Irving</dc:creator>
		<pubDate>Thu, 17 Sep 2009 20:42:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysociety.org/?p=2982#comment-110715</guid>
		<description>One thing I should add that we did early on... Lots of the traffic was, as ever, search engine robots.

To try and minimise problems for real uses, we slowed down Google&#039;s bot with &lt;a href=&quot;https://www.google.com/webmasters/tools/home?hl=en&quot; rel=&quot;nofollow&quot;&gt;webmaster tools&lt;/a&gt; and added a Crawl-delay to robots.txt to &lt;a href=&quot;http://www.bing.com/community/blogs/webmaster/archive/2009/08/10/crawl-delay-and-the-bing-crawler-msnbot.aspx&quot; rel=&quot;nofollow&quot;&gt;slow down bing&#039;s bot&lt;/a&gt;.

I also added lots of pages to &lt;a href=&quot;http://www.whatdotheyknow.com/robots.txt&quot; rel=&quot;nofollow&quot;&gt;robots.txt&lt;/a&gt;, to stop search engines crawling them. These were pages that had no real new content, usually because they were pages for performing an action. e.g. the page to add an annotation to each requset (/annotate/*).

I&#039;m just undoing the crawl delays now...</description>
		<content:encoded><![CDATA[<p>One thing I should add that we did early on&#8230; Lots of the traffic was, as ever, search engine robots.</p>
<p>To try and minimise problems for real uses, we slowed down Google&#8217;s bot with <a href="https://www.google.com/webmasters/tools/home?hl=en" rel="nofollow">webmaster tools</a> and added a Crawl-delay to robots.txt to <a href="http://www.bing.com/community/blogs/webmaster/archive/2009/08/10/crawl-delay-and-the-bing-crawler-msnbot.aspx" rel="nofollow">slow down bing&#8217;s bot</a>.</p>
<p>I also added lots of pages to <a href="http://www.whatdotheyknow.com/robots.txt" rel="nofollow">robots.txt</a>, to stop search engines crawling them. These were pages that had no real new content, usually because they were pages for performing an action. e.g. the page to add an annotation to each requset (/annotate/*).</p>
<p>I&#8217;m just undoing the crawl delays now&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

