I'm not an expert in Java EE, but from what I've been reading through the internet, some versions of GlassFish happen exactly the same problem, but no one knows why. So I'll summarize the steps I found on the internet and see if it will work for you.
01) Update your GlassFish, if it is the last version, go back to a previous one.
02) Check if you have more than 2GB of RAM, some people report problem with 2gb of RAM with GlassFish on Windows 7 / Server.
03) I started to use Tomcat.
04) Check how the software routines are if you are developing it, there are good practices that avoid this problem, for example, do not query the database in GETs and SETs.
Home
That's all I found on the internet, as I said before, I'm not an expert in Java, I just want to help.