Truncated chunk error on SPARQL constraint evaluation

2 views
Skip to first unread message

Andrea Westerinen

unread,
Jun 8, 2015, 5:58:52 PM6/8/15
to sta...@clarkparsia.com
On doing a constraint evaluation where my constraints are sparql queries, my data is in a named graph and my constraints are in the default graph, I am getting the following error:

com.complexible.stardog.StardogException: Truncated chunk ( expected size: 1048576; actual size: 137114)

The exception is thrown when I retrieve the violation bindings. 

Any suggestions?

Andrea

Michael Grove

unread,
Jun 9, 2015, 9:23:37 AM6/9/15
to stardog
On Mon, Jun 8, 2015 at 5:58 PM, Andrea Westerinen <arwest...@gmail.com> wrote:
On doing a constraint evaluation where my constraints are sparql queries, my data is in a named graph and my constraints are in the default graph, I am getting the following error:

How exactly are you adding constraints to the default graph?
 

com.complexible.stardog.StardogException: Truncated chunk ( expected size: 1048576; actual size: 137114)

I believe that message comes from the Apache HTTP client, which if that's the case, suggests there's an issue sending the bindings back.  Likely, an error would have occurred while computing them.  Is there a corresponding stacktrace in the stardog.log file on the server?

Can you provide an example program that demonstrates the issue?

Cheers,

Mike
 

The exception is thrown when I retrieve the violation bindings. 

Any suggestions?

Andrea

--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en

Andrea Westerinen

unread,
Jun 11, 2015, 3:36:00 PM6/11/15
to Stardog
Replies up here:

1. How are constraints added?
When I build the db, I use "stardog-admin icv add" to add all the constraints in a certain directory.

2. Anything in stardog.log?
No.

So, I modified my code to reduce the amount of data being checked by the constraints to the minimal set.  That seemed to resolve the issue UNTIL I added more constraints. 

Now, I just hang when getting the violation bindings for an ICV Connection.  I tried a worse case scenario (operating over 332 triples) where almost all the triples would generate violations.


To unsubscribe from this group and stop receiving emails from it, send an email to stardog+u...@clarkparsia.com.

Andrea Westerinen

unread,
Jun 11, 2015, 4:33:50 PM6/11/15
to Stardog
Let me amend my last post.

The system does not hang, but takes a LONG TIME to return results.  I reduced my test to 120 triples with approx 90 different sparql constraints.  Time to execute was 11 seconds.


Kendall Clark

unread,
Jun 11, 2015, 4:39:02 PM6/11/15
to stardog
What is 11 seconds relative to such that it's a "LONG TIME"?

Can you share the constraints?

Cheers,
Kendall

Andrea Westerinen

unread,
Jun 22, 2015, 3:29:46 PM6/22/15
to Stardog
The 11 secs versus "LONG TIME" comment was related to examining 120 triples with 90+ constraints.  When I had a couple thousand triples with the same number of constraints, I gave up waiting since I knew that my customers would not accept the delay. 

My constraints are a translation of the Security Markings Schematron rules found at http://www.dni.gov/index.php/about/organization/chief-information-officer/information-security-marking-metadata.  On that page, there is a download for the XML Data Encoding Spec for Information Security Marking Metadata.  If you unzip the file, and go into the Schematron/ISM directory, you can find the rules.  There are more than 90, but I was focused on examining ones that apply to sets of resources.

To get the necessary response speeds, I reduced the number of triples to a minimum by defining attribute value combinations that were specifically involved in the constraints, and then I refined the SPARQL constraints to use only very basic syntax.  The first step is problematic in that I have to change code as the constraints are expanded, in order to bring in more combinations or values (or both).  The second step is not problematic, but I wonder if you have any documentation on the performance implications of different constraint syntaxes (OWL versus SPARQL, or SPARQL UNION vs FILTER (?someVariable IN (<URI1>, <URI2>, ...)), etc.).

Also, I seem to have stumbled onto a bug related to UNION vs FILTER...IN, but I will use a different post to explain the issue.

Thanks.
Reply all
Reply to author
Forward
0 new messages