...
Some code changes can be made to improve the way uPortal handles memory. There are also things you can do to troubleshoot OutOfMemory in your portal.
The exciting uPortal 3 answer
uPortal 3 aggressively adopts registries fronting centralized caching services, staving off the proliferation of memory-eating caches all over the place and shrinking the persistent size of sessions.