RSS memory error: customizing output limit

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4085761 bytes) in PATH/application/views/scripts/items/browse.rss2.php on line 3

So, I know the root cause of this error is that, for a variety of reasons, I'm outputting all of our content (several hundred items) all at once. That is, our "items per page" setting is 999 and we cannot lower it until we solve other issues.

But I'm wondering if there is some way to limit the RSS2 output by doing something like...

/items/browse?output=rss2&limit=10

... or even by writing a custom function to replace auto_discovery_link_tags()

Thoughts, ideas?

thanks -- Erin

instead of

/items/browse?output=rss2&limit=10

try

/items/browse?output=rss2&per_page=10

That does it, thanks!