<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Scout ~ The Blog comments on Monitoring Your Rails Sessions With Scout</title>
    <link>http://blog.scoutapp.com/</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Scout ~ The Blog comments</description>
    <item>
      <title>"Monitoring Your Rails Sessions With Scout" by derek</title>
      <description>&lt;p&gt;An oft-forgotten maintenance issue on &lt;a href="http://rubyonrails.com"&gt;Ruby on Rails&lt;/a&gt; applications is forgetting to expire old sessions. Lots of sessions in your database can dramatically slow performance.&lt;/p&gt;


	&lt;p&gt;You can use a cron job to expire old sessions, but it&amp;#8217;s not always foolproof. We&amp;#8217;ve seen timeouts when attempting to delete lots of session records and it&amp;#8217;s not out of the range of possibilities to mistakenly disable multiple cron jobs.&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://timmorgan.org/"&gt;Tim Morgan&lt;/a&gt; provided the inspiration for our latest plugin, &lt;a href="http://scoutapp.com/plugin_urls/14-rails-session-monitoring"&gt;Rails Session Monitoring&lt;/a&gt;. The plugin is dirt simple, reporting back the total number of sessions and the number of old sessions (you can define what constitutes old &amp;#8211; the default is 14 days).&lt;/p&gt;


	&lt;p&gt;Here&amp;#8217;s what I saw when I ran it on of our apps:&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://img.skitch.com/20080415-raybfad1mhayqdeu8bptwp76ka.jpg" alt="sessions"/&gt;&lt;/p&gt;


	&lt;p&gt;This is also the type of plugin that you don&amp;#8217;t really need to run frequently &amp;#8211; once-per-day is probably fine.&lt;/p&gt;

</description>
      <pubDate>Wed, 16 Apr 2008 11:59:00 CDT</pubDate>
      <guid>&lt;a href="/articles/2008/04/16/new-plugin-by-tim-morgan-rails-session-monitoring"&gt;Monitoring Your Rails Sessions With Scout&lt;/a&gt;</guid>
      <link>&lt;a href="/articles/2008/04/16/new-plugin-by-tim-morgan-rails-session-monitoring"&gt;Monitoring Your Rails Sessions With Scout&lt;/a&gt;</link>
    </item>
  </channel>
</rss>
