Sep 1, 2012

Thunderbird memory leak

Keywords:  Thunderbird, Lightning, Memory Leak

A couple of months ago I transitioned to having my email and calendar hosted via Google Apps - gmail, gcal and all the rest.  As I'm a Thunderbird user, using the Lightning add-on, it was easy to point my calendar to gcal.  At the same time, I added the published US and Canadian Holiday calendars.  Then, my troubles began.

Of course, like most changes, the troubles didn't start straight away.  The long and short of it was Thunderbird's increasing appetite for memory.  Over several hours, it'd increase.

Today, I found what is tickling this issue and for now, I have a work-around.

The problem was with one of the published holiday calendars, I had it mistakenly refreshing every minute.  Yikes!  Holidays don't get updated that often.  I've switched the refresh cycle to the maximum (before manual) of 60 minutes and memory is no longer growing at an alarming rate.

Seems like a memory leak.  :)  Shortly, I'll report a bug.

Update 1

I filed the bug but before filing the bug, I rummaged around bugzilla to see if there was a related issue.  I found some information about a garbage collector.  Hmmm, does Thunderbird use a garbage collector to free up memory?  What if it only runs during an idle period?  What if by refreshing once a minute, it's not enough time for the garbage collector to kick in?

Update 2 

I don't think it's a garbage collection issue.  Using RRD, I can graphically see the RSS value growing for Thunderbird.  I've created the following bug report:  https://bugzilla.mozilla.org/show_bug.cgi?id=787751

Let's see what the developers have to say ... perhaps there's something funky in my set up.  :)

Update 3

If you follow the bug, you'll see we narrowed the problem to a memory leak in Thunderbird.  Daily, I restart Thunderbird.  :(

Update 4 - 6:31 am, June 19th 2013

I've been asked to test with Thunderbird 22 beta 1.  I am monitoring its memory growth using RRD (again).  Assuming no restarts, I should have some information by Friday morning!