>From the documentation of D2RQ, have you read the following and enabled keep 
>alive?
3.4 Keep-alive long-term connections #<http://d2rq.org/d2rq-language#keep-alive>

Some database servers like MySQL may terminate open client connections after 
some interval (MySQL default is 8 hours). To keep alive long-term connections, 
D2R can be configured to periodically run "noop" queries. This feature can be 
enabled with the special property jdbc:keepAlive. An example is given below:

@prefix jdbc: <http://d2rq.org/terms/jdbc/> .

map:database a d2rq:Database;
    # ... other database configuration ...
    jdbc:keepAlive "3600"; # value in seconds
    jdbc:keepAliveQuery "SELECT 1"; # (optionally to override default noop 
query)
    .

By default the noop query is “SELECT 1”, which may not work with some DBMS. For 
this purpose, the default query may be overridden with a custom noop query.

Regards,
Srikar

On Aug 21, 2014, at 11:56 AM, Torsten Eid 
<eid_tors...@lilly.com<mailto:eid_tors...@lilly.com>> wrote:

Hello,

I am faced with occasional problems when accessing D2RQ server. It seems that 
the connection to the DB is lost.
The start page for the D2R projects can still be access (so tomcat showing it) 
, but drilling down into “data”  results in a HTTP 500.

Looks like the db connection is lost , error message is : 
de.fuberlin.wiwiss.d2rq.D2RQException: No more data to read from socket

This happens to occasionally to oracle db’s using an oracle jdbc driver  , and 
much more frequently to a MS SQL DB connected where we use the latest jtds 
driver. All D2R endpoints run under same tomcat instance. using D2RQ version 
0.8 under a linux tomcat, system runs 24/7

if this problem occurs  the log shows this (I renamed table names for this 
post):

19:15:06 INFO  Servlet              :: Service URI = <sparql>
19:15:06 INFO  SPARQL               :: Query: SELECT ?s WHERE {?s ?p ?o} LIMIT 1
19:15:06 INFO  SPARQL               :: JenaException: I/O Error: Connection 
reset: SELECT DISTINCT "ABC"."CDE"."FGH" FROM "
KLMOP"."Reason" (E0)
19:15:06 INFO  ResponseHttp         :: Error: URI = sparql : I/O Error: 
Connection reset: SELECT DISTINCT "ABC"."CDE"."FGH"
FROM "LMNOP"."Reason" (E0)
19:15:06 WARN  Servlet              :: Internal server error
de.fuberlin.wiwiss.d2rq.D2RQException: Invalid state, the Connection object is 
closed.; query was: SELECT DISTINCT "ABC"."FGH"."
ReasonId" FROM "ABC"."RFGH" (E0)
        at 
de.fuberlin.wiwiss.d2rq.sql.QueryExecutionIterator.close(QueryExecutionIterator.java:114)
        at 
de.fuberlin.wiwiss.d2rq.optimizer.iterators.RelationToBindingsD2RQIterator$StagePattern.closeIterator(RelationToBindingsD2RQIt
erator.java:203)


Any thougths / suggestions welcome.  (Bouncing the tomcat is a workaround but 
not a good solution.)

Thx in advance
Torsten

------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/_______________________________________________
d2rq-map-devel mailing list
d2rq-map-devel@lists.sourceforge.net<mailto:d2rq-map-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/d2rq-map-devel

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
d2rq-map-devel mailing list
d2rq-map-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/d2rq-map-devel

Reply via email to