In our application we have both, Apache Server (for the front end only)
& JBoss 4.2 (for the business / backend end)
. We are using Ubuntu 12
as server OS. Our application is throwing java.lang.OutOfMemoryError: "Java heap space"
repeatedly. (It throws OOMEs for an hour or so and then goes back to working normally for next 2-3 hours. Then it repeats the pattern.) Our Java memory settings are
-Xms512m -Xmx1024m
Our server has 6 GB of Ram physically. Please guide us do we need to increase java Heap size. If yes, what should be the ideal size considering physical 6GB of Ram.