If you get a lot of
java.lang.OutOfMemoryErrors while running your web application on Tomcat from Eclipse, it means that you should increase the heap size of your tomcat instance. To do this, follow these steps:
1. Open the Server view and double-click on the Tomcat instance. The server configuration screen will open.
2. Click on the “Open launch configuration” link from the General Information section.
3. Click on the Arguments tab and add the following at the end of the VM arguments:
The values for this 2 arguments may vary, depending on your needs or available memory 🙂