Connection to Stardog causes java.lang.OutOfMemoryError


I was trying a load test on my server (he receives datas, translate them in semantic and push them to stardog). But i Found a java.lang.OutOfMemoryError during my tests.

It's always at the same time at 112 iteration when i execute : connectionPool.obtain(); (see code below)
Does some know how to fix that ?

if (pacsUrl==null) {pacsUrl = Application.pacsUrl ;}
if (starDogUrl==null) {starDogUrl = Application.starDogUrl ;}
logger.debug("Creation of the StarDog connection (Database : "+db.toString()+") at "+starDogUrl);
ConnectionConfiguration connectionConfig = ConnectionConfiguration
.credentials(username, password)

logger.debug("StarDog connection (reasoning : "+ConnectionConfiguration.REASONING_ENABLED.toString()+")");

if (connectionPool != null) {connectionPool.shutdown();}

connectionPool = createConnectionPool(connectionConfig); // Create the Stardog connection
starDogConnection = connectionPool.obtain();

I still use Stardog 5 and API for Stardog 5
Thank you

Are you ever releasing the connection back to the connection pool?

1 Like

Thank you
You were right the problem cas that : i didn't released the connectionpoll

Thank you