ternaustralia / linkeddata-api

TERN's Linked Data Services API
https://linkeddata.tern.org.au/api
0 stars 1 forks source link

RDF4J SPARQL query "Handler dispatch failed; nested exception is java.lang.StackOverflowError" #37

Closed edmondchuc closed 1 year ago

edmondchuc commented 2 years ago

For large resources with many relationships and properties, fetching the data may result in the following error:

Handler dispatch failed; nested exception is java.lang.StackOverflowError

Related issues on the web:

edmondchuc commented 2 years ago

This occurs when performing large queries for resource labels.

Solution: break the query into smaller chunks to avoid the java.lang.StackOverFlowError error. Cache the values using Flask-Caching, which is set up ready to use in tern_flask.

Nice to have: with caching, use stale-while-evaluate strategy for fast experience for users.

edmondchuc commented 1 year ago

This may have been fixed in the following PRs

edmondchuc commented 1 year ago

This should likely no longer occur with the introduction of paginated property values on resources in the v2 API https://github.com/ternaustralia/linkeddata-api/pull/51