marklogic - SPARQL queries causing XDMP-MEMCANCELED -
we performing series of different sparql queries on database containing ~5 million triples.
our queries cause xdmp-memcanceled-error though not consistently, return correct result within few seconds or less. queries occationally seems hang , cause server run @ 100% cpu until query times out.
we have tried increasing memory-related settings find. query runs fine on other triple stores/engines.
we running marklogic 8.0-11 aws instance 8 gb of internal memory , 16 gb of swap space.
example of straightforward query causes error:
prefix xsd: <http://www.w3.org/2001/xmlschema#> prefix t5_m: <http://url.com/t5/model#> prefix t5_d: <http://url.com/t5/data#> select distinct ?_app_id ( ?_err ?_reason ) ?_comment ?_severity { bind ( 3 ?_severity) bind ( "generated hl7 v2 conformance profile of ihe pcd-01 message" ?_comment ) filter( ?_app_id = 'app_id') filter ( ?_ts >= '2015-04-21t09:04:07.871' ) filter ( ?_ts <= '2015-04-21t09:07:43.973' ) ?ack t5_m:hasmsh ?msh . ?msh t5_m:hasmsh.5 ?msh_5 . ?msh_5 t5_m:hashd.1 ?hd_1 . ?hd_1 t5_m:hd.1value ?_app_id . ?ack t5_m:hasmsa ?msa . ?msa t5_m:hasmsa.2 ?msa_2 . ?msa_2 t5_m:msa.2value ?_msg_id . ?pcd_01_message t5_m:pcd_01_message . ?pcd_01_message t5_m:id ?_msg_id . ?pcd_01_message t5_m:timestamp ?_ts . ?ack t5_m:haserr ?err . ?err t5_m:haserr.7 ?err_7 . ?err_7 t5_m:err.7value ?_err . }
is there relevant configuration settings have missed or there wrong query?
yours truly, alexander
when total hash join table size of running sparql queries exceeds 50% of host memory, sparql query using memory hash joins canceled "xdmp-memcanceled" error. may indicate number of things:
the host overloaded number of simultaneously executing sparql queries. try adding more memory host (8gb small) or load-balancing sparql queries across more marklogic hosts.
the sparql query optimizer picking poor query plans query. sparql queries larger numbers of joins (for instance query has 13 joins), try execute sem:sparql() function higher optimization level, ie: try adding option "optimize=2".
the query optimizer may have bug or deficiency causes choice of poor query plan. should contact marklogic support - able guide find out query plan chosen , optimization parameters lead problem. may able suggest solution given more information, or may file bug report fix made.
john
Comments
Post a Comment