-1

I'm running a Tomcat 7.0.22 server with Java 1.7 and I'm running into an issue where Tomcat isn't release memory after a broken pipe exception.
Background on the problem: I'm using firefox 10.0.5 to produce get request, which is handled with Jersey and queries an Oracle database using hibernate. The results of this query is then paged and returned back to the consumer in a marshalled object using JAXB in either XML or JSON format.

To create the problem I'm intentionally setting the page size to a very large number. My tomcat server uses about 300 m of the 1024m allocated to the heap to perform the query, according to Visual VM. Firefox eventually cores when receiving the results and the browser needs to be restarted. Looking at the catalina.out logs a broken pipe exception is reported. After several hours of monitoring the heap size and performing manual GCs the amount of data on the heap never returns to the state it was at before the query was performed.

Looking at the data on the heap, using visual vm, the big hitter is a Character array, which I'm fairly certain is the results of the query constructed in XML. Also, I noticed the thread created to handle the query is never terminated. I've played with the session-timeout and there is no change. First of all, has anyone seen this and is there a fix/solution to the problem?

1 Answers1

0

This ended up being a hibernate problem where the repository needed to be cleared in order to release all the objects queried. Simply nulling it out or letting it go out of scope wasn't enough to deference the objects.