Allowed memory size exhausted

Hello All,

What memory setting do we need to modify to address the following error. This install is on a VPS and we have full access and control of its configuration.

[17-Jan-2012 22:29:09] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 114 bytes) in /home/soobabiz/public_html/wp-includes/plugin.php on line 164

This particular error occurs every time a user performs a search using the search box on the WPMUDEV Blogs Directory page on the main site.

We experienced the same error when users perform a search on the WPMUDEV Members Directory page on the main site.

We also experienced the same error when we activated the WPMUDEV Custom Google Search plugin and users searched with it.

The only other error appearing frequently in the server log is the following one that I do not know what it is associated with.

[17-Jan-2012 18:44:39] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 for query SELECT COUNT(DISTINCT ID) FROM made by require, require_once, include, get_footer, locate_template, load_template, require_once, sf_pagenavi

I have deactivated all plugins and reactivated them one by one.
The Out of memory error was the first to occur and the other has nto yet occurred, so I thought we'd tackle this one for first.

We have set PHP Memory to 256M

Any advice appreciated.

Phil D