Posted on Nov 27, 2009

WordPress: Fatal error: Allowed memory size of xxx bytes exhausted

This took me several hours of my time so I’m posting it for posterity. Like many people, I began getting these errors when loading my blog. In most cases, this indicates a memory leak in a plugin. I upped the memory limit in my wp-settings.php for a while but my blog became incredibly slow. I tried disabling plugins one by one, changing my theme, etc. I installed the wp-memory-usage plugin which led my nowhere. Finally, I figured I’d optimize my database and I found the wp-dbmanager plugin and noticed my wp_options table was 463 MB in size (compared to 900k for my wp_posts table).

It turns out I had over 1000 rows of cached rss lookups (select count(*) from wp_options where option_name like ‘rss%’). It is safe to delete these rows and it fixed the problem. I now have a working blog again.

1 Comment