Do you need to set the heap size (min and max) available for the java virtual machine being used by your server? well I ran into that annoying OutOfMemoryError message today and I took a couple of screenshots describing how to do it, check it out.
Here you can see WebSphere's console:
In this other case I used Eclipse, you can check how to set the values in the virtual machine parameters at the server connector tab for Geronimo: