I'm using the connection pool from java against Stardog. When using the pool Stardog will eventually run out of memory. Switching to creating and closing connections for each query fixes this.
Here is how Stardog looks when running out of memory:
The small white sections are when stardog is unresponsive because of GC. The light green, dark green beginning of the memory is how stardog usually runs, only minor GC.
I've been debugging to see if I'm forgetting to close something against stardog, but I can't see that anything is left open.
I used reflection to get hold of all the variables inside the connection, and also the size of the pool.
mClient : com.complexible.stardog.protocols.http.client.HttpClientImpl@65215184 mContext : com.complexible.stardog.protocols.SPECMessageContext@117a4c mServerURL : http://stardog:5820/ mDBMS : com.complexible.stardog.api.admin.AdminConnectionImpl@11c1e8a LOGGER : Logger[com.complexible.stardog.api.Connection] THRESHOLD : 100000 mOpenQueryResults :  mStreamSourceCreator : com.complexible.common.rdf.impl.StreamStatementSources$OneTimeSourceCreator@72949cd6 mOpen : true mInTx : false mPendingChanges : com.complexible.common.base.ChangeList@1dd65e71 mNumPending : 0 mConnectionViews : com.complexible.common.view.Views@6c5446bc pool size: 0
This is from one the services that is causing Stardog to run out of memory. As you can see there is no transaction left open and all query results are closed. Pool size is 0, because this connection hasn't been returned to the pool yet.
How do I proceed to debug stardog to find out why the connection is taking more and more memory in Stardog?