Out of memory exception when running query

Created by Steve Place, Modified on Wed, Jan 24 at 2:23 PM by Steve Place

If you run into an out of memory exception when running a query, it's possible one of your queries is leaking blocks. To see if this is the case, run the command stardog-admin server metrics when your Stardog server is idle (i.e., when no queries are running). Look at the metrics dbms.memory.native.query.blocks.max and dbms.memory.native.query.blocks.used. (Note: memory management mode must be set to NATIVE for these metrics to appear.) If dbms.memory.native.query.blocks.used is not zero, at least one of your queries is leaking blocks.


To figure out which query/queries is leaking blocks, run all the queries you've run since problems started happening (individually, not all at once) and check the number of blocks used before and after each query. If the number of blocks used is greater than it was before running the query, that query is leaking blocks.


If you find a query is leaking blocks, please send us the query profile (stardog query explain --profile myDb myQuery) for the query and the stardog.log file in a support ticket.


To read more about memory management in Stardog, see the docs.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article