On 24/01/12 15:16, John Fereira wrote:
After getting fuseki with SDB working yesterday I check it this
morning and got a 500 Server Error, with a SQLException in executing
SQL statement message.
This appears to be the same problem I was trying to fix by migrating
from Joseki to Fuseki. After a bit of searching I came across this
thread (http://tech.groups.yahoo.com/group/jena-dev/message/35766)
which describes the same problem when using Joseki. The link I've
included shows a class for doing database connection pooling but it
appears to be a standalone class and there isn't any information
about where it might be hooked into SDB. I've been using database
connection pooling for a long time and have had better success with
the C3p0 db connection pooling library and have it wired into a
Tomcat servlet container but it seems to me a ConnectionPooling class
could be wired into SDB, but it would be nice if it pulled in the
database connection values from the config file instead of hardcoding
them in the java class as the URL shown above does.
I've seen numerous references to connection management and connection
pooling with SDB but haven't seen any sort of recipe for how to put
it all together.
If it's overnight, is this the MySQL timeout idle connections issue?
MySQL, by default, kills connections after (IIRC) 8 hours of idleness.
Connection pooling is a good solution to this, the crude way is
?autoReconnect=true or adjust the server settings to some very, very
long period.
Adding connection pooling support to SDB would be good. There's nothing
there except an assembler setting to set the number and a comment in
SDBConnection about where it might hook in ... but that's as far as it goes
Not sure of the status of c3po ... one preview release in 2010-05 but
before that 2007-05. Maybe Apache Commons DBCP is a better bet.
At the moment, my work is on TDB and I'm unlikely to have time to look
at SDB in any reasonable timeframe.
Why not raise a JIRA for this? And a patch?
(We can't directly copy from that yahoo! message but I'm sure Bastian
would not mind submitting it to Apache if asked.)
Andy