2012/5/3 Andy Seaborne <a...@apache.org>: > On 30/04/12 06:50, Tayfun Gökmen HALAÇ wrote: >> >> Thank you for your answer Andy. >> >> I have already autoReconnect=true in my configuration file. Here's my SDB >> store configuration. Is there any mistake? >> >> <#sdbvoidstore> rdf:type sdb:Store ; >> rdfs:label "SDB" ; >> sdb:layout "layout2" ; >> sdb:connection >> [ rdf:type sdb:SDBConnection ; >> sdb:sdbType "MySql" ; >> sdb:sdbHost "localhost" ; >> sdb:sdbName "voidstore" ; >> sdb:sdbUser"****"; >> sdb:sdbPassword"****"; >> sdb:driver "com.mysql.jdbc.Driver" ; >> sdb:jdbcURL "jdbc:mysql://localhost/voidstore?autoReconnect=true" ; >> ] >> . >> >> The first point is that Joseki does not catch a QueryStageException which >> encapsulates mysql connection exception. It catches a JenaException. > > > I'm not sure why QueryStageException is being raised. In the rest of the > description are you using sdb:Model?
There is a sdbModel description at the beginning of the configuration file. [] ja:loadClass "com.hp.hpl.jena.sdb.SDB" . sdb:DatasetStore rdfs:subClassOf ja:RDFDataset . sdb:Model rdfs:subClassOf ja:Model . Although execQueryProtected() method in SPARQL class expects mysql exception within a QueryStageException, it is thrown within a JenaException by SDB. >> >> >> My modified SPARQL processor cannot obtain a connection although it tries >> for the second time and autoreconnect is enabled. > > > That should work. Unfortunately does not work. > > One way to keep the connection alive is to ask a lightweight query every > hour, e.g "ASK{:x :p :o}" -- the IRIs do not have to be in the data. I have constructed a quartz scheduler to send a query once every four hours while connection timeout of MySQL is eight hours. Which one of the following queries is low-cost? "ASK{:x :p :o}" or "SELECT * WHERE {?s ?p ?o.} LIMIT 1" > > Andy > >> >> Tayfun >> >> >> On 27/04/12 17:01, Tayfun Gökmen HALAÇ wrote: >>> >>> Andy, >>> >>> Do you have any comments on Joseki SPARQL processor? Message are answered >>> on a "when I can basis" My expeirnece was that if autoreconnect is enabled, >>> then the first call >> >> after a long idle period still failed. Retrying was necessary. But you >> still need autoreconnect. Andy > >