This is my configuration file (attached).
Il 12/01/2012 17:58, Andy Seaborne ha scritto:
On 12/01/12 09:39, Matteo Busanelli (GMail) wrote:
Hi everyone,
I'm tryng to use Joseki with SDB (on MySQL 5.1) for serving multithread
application queries.
If all queries doesen't overlapp everything works well.
The problem comes wehn two different thread make concurrent queries that
overlaps and I got this error:
======================= log Stacktrace =====================
...
As you can see here I have the first REQUEST and the second one that
come before RESPONSE of the first one. As a result The first ends
correctly (RESPONSE /sparql 200) whereas the second one recieve a ::
RESPONSE /sparql 500 (so that I get an Http 500 error: Internal Server
Error:... from Joseki).
I already tried to configure "joseki:lockingPolicy" parameter but
whatever value I specify (joseki:lockingPolicyMutex,
joseki:lockingPolicyMRSW,joseki:lockingPolicyNone ) the result doesn't
change. I also have tried to increase the the "joseki:poolSize"
parameter but nothing.
What can I do to let Joseki manage correctly the concurrent queries
trough SDB?
I'm working with:
- Joseki 3.4.4
- SDB-1.3.4
- Jena-2.6.4
- MySql 5.1
If it may be useful I can attach the joseki config file used.
It would be useful to see it.
Andy
Thanx in advance,
Matteo.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix module: <http://joseki.org/2003/06/module#> .
@prefix joseki: <http://joseki.org/2005/06/configuration#> .
@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
@prefix sdb: <http://jena.hpl.hp.com/2007/sdb#> .
@prefix imo: <http://www.imolinfo.it/ontologie/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
<> rdfs:label "Joseki Configuration File - SDB busa" .
# Stripped down to support one service that exposes an
# SDB store as a SPARQL endpoint for query and one for
# one of the graphs in an SDB store.
[] rdf:type joseki:Server .
## --------------------------------------------------------------
## Services
# Service publishes the whole of the SDB store - this is the usual way to use
SDB.
<#service1>
rdf:type joseki:Service ;
rdfs:label "SPARQL-SDB" ;
joseki:serviceRef "sparql" ; # web.xml must route this name to Joseki
joseki:dataset <#sdb-part> ;
joseki:processor joseki:ProcessorSPARQL_FixedDS .
## SPARQL/Update.
## Creation of named graph from web requests is not supported.
<#serviceUpdate>
rdf:type joseki:Service ;
rdfs:label "SPARQL/Update" ;
joseki:serviceRef "update/service" ;
joseki:dataset <#sdb-part>;
joseki:processor joseki:ProcessorSPARQLUpdate .
## --------------------------------------------------------------
## Datasets
## See also SDB documentation -- http://jena.hpl.hp.com/wiki/SDB
## Special declarations to cause SDB to be used.
## Initialize SDB.
## Tell the system that sdb:DatasetStore is an implementation of ja:RDFDataset .
## Tell the system that sdb:Model is an implementation of ja:RDFDataset .
[] ja:loadClass "com.hp.hpl.jena.sdb.SDB" .
sdb:DatasetStore rdfs:subClassOf ja:RDFDataset .
sdb:Model rdfs:subClassOf ja:Model .
<#sdb_busa> rdf:type sdb:DatasetStore ;
## Number of concurrent connections allowed to this dataset.
joseki:poolSize 10 ;
sdb:store <#store> .
<#store> rdf:type sdb:Store ;
sdb:layout "layout2" ;
sdb:connection <#conn> ;
sdb:engine "InnoDB" ; # MySQL specific
.
<#conn> rdf:type sdb:SDBConnection ;
sdb:sdbType "MySQL" ; # Needed for JDBC URL
sdb:sdbHost "localhost" ;
sdb:sdbName "sdb" ;
sdb:sdbUser "sdb" ;
sdb:sdbPassword "password" ;
sdb:driver "com.mysql.jdbc.Driver" ;
.
## ATTENZIONE: questa conf è molto importante e funnziona per avere sia il
grafo
## di default che i namedGraph specifici da richiamare con GRAPH nella query
(NON FROM)
## Dataset con la dichiarazione dei grafi
<#sdb-part> rdf:type ja:RDFDataset ;
# If ja:namedGraph is used here, there is no correspondence
# with the name in the SDB store.
ja:defaultGraph <#test-graph> ;
ja:namedGraph
[ ja:graphName <http://www.imonlinfo.it/ontologie/grafi/test/bps-all> ;
ja:graph <#bps-all-graph> ] ;
ja:namedGraph
[ ja:graphName
<http://www.imolinfo.it/ontologie/abi-lab/v1.1/abilab_tassonomia_applicativa> ;
ja:graph <#abi-app-graph> ] ;
ja:namedGraph
[ ja:graphName <http://www.imolinfo.it/ontologie/grafi/all-merged> ;
ja:graph <#merged-all-graph> ] ;
ja:namedGraph
[ ja:graphName <http://www.imolinfo.it/ontologie/grafi/d2r-test> ;
ja:graph <#d2r-test-graph> ] ;
.
## SDB - GRAFO DI DEFAULT (Grafo di test)
<#test-graph> a sdb:Model ;
sdb:namedGraph <http://www.imolinfo.it/ontologie/grafi/test-graph> ;
sdb:dataset <#sdb_busa> ;
.
## SDB - GRAFO ABI LAB Tassonomia Applicativa (Modello + istanze) PICCOLO
<#abi-app-graph> a sdb:Model ;
sdb:namedGraph
<http://www.imolinfo.it/ontologie/abi-lab/v1.1/abilab_tassonomia_applicativa> ;
sdb:dataset <#sdb_busa> ;
.
## SDB - GRAFO BPS (modelli + istanze) - GRANDE
<#bps-all-graph> a sdb:Model ;
sdb:namedGraph <http://www.imonlinfo.it/ontologie/grafi/test/bps-all> ;
sdb:dataset <#sdb_busa> ;
.
## SDB - ALL MERGED
<#merged-all-graph> a sdb:Model ;
sdb:graphName <urn:x-arq:UnionGraph> ;
sdb:dataset <#sdb_busa> ;
.
## D2R MODEL GRAPH
[] ja:imports d2rq: .
<#d2r-test-graph> a d2rq:D2RQModel;
d2rq:mappingFile <file:./TopicICTTaxonomy_mapping.n3>;
d2rq:resourceBaseURI
<http://www.imolinfo.it/ontologie/internal/v1.0/topic-ict-model#>;
.
## --------------------------------------------------------------
## Processors
joseki:ProcessorSPARQL_FixedDS
rdfs:label "SPARQL processor for fixed datasets" ;
rdf:type joseki:Processor ;
module:implementation
[ rdf:type joseki:ServiceImpl ;
module:className <java:org.joseki.processors.SPARQL>
] ;
# This processor does not accept queries with FROM/FROM NAMED
joseki:allowExplicitDataset "false"^^xsd:boolean ;
joseki:allowWebLoading "false"^^xsd:boolean ;
# The database is safe for MRSW (multiple-reader, single-writer).
#joseki:lockingPolicy joseki:lockingPolicyMutex ;
#joseki:lockingPolicy joseki:lockingPolicyMRSW ;
#joseki:lockingPolicy joseki:lockingPolicyNone ;
.
#joseki:ProcessorSPARQL
# rdfs:label "General SPARQL processor" ;
# rdf:type joseki:Processor ;
# module:implementation
#[ rdf:type joseki:ServiceImpl ;
# module:className <java:org.joseki.processors.SPARQL>
# ] ;
# joseki:allowExplicitDataset "true"^^xsd:boolean ;
# joseki:allowWebLoading "true"^^xsd:boolean ;
# #joseki:lockingPolicy joseki:lockingPolicyNone ;
# joseki:lockingPolicy joseki:lockingPolicyMRSW ;
# #joseki:lockingPolicy joseki:lockingPolicyMutex ;
# .
joseki:ProcessorSPARQLUpdate
rdfs:label "SPARQL Update processor" ;
rdf:type joseki:Processor ;
module:implementation
[ rdf:type joseki:ServiceImpl ;
module:className <java:org.joseki.processors.SPARQLUpdate>
] ;
joseki:lockingPolicy joseki:lockingPolicyMRSW ;
.
# Local Variables:
# tab-width: 4
# indent-tabs-mode: nil
# End: