When a Glassfish domain is created it already comes with a default set of JVM options (including memory related options), as you keep working on your project your application will increasingly grow and consume more memory, until it reaches the point where the default Glassfish memory configuration isn’t appropriate to run your app anymore. If you are facing this problem you can easily increase the memory by following the instructions bellow:
1 – Open the glassfish console on your browser and click on
2 – Then click on
3 – On the JVM Options tab these are the two options you may want to change:
As long as you have memory available on your server you can put any size you want here. After the modifications you just need to restart your server and you’re done!