On 22/05/11 12:42, Rob Stewart wrote:
...
My only issue now is that the Joseki connection to my database becomes
idle and keeps timing out, with this error message:
No operations allowed after connection closed.Connection was
implicitly closed by the driver.
Previously, I used:
ja:dbURL "jdbc:mysql://localhost/MyDB?autoReconnect=true" ;
Is there an alternative I can use in the sdb:sdbHost property, to
keep the connection alive, or auto-reconnect?
Many thanks,
--
Rob Stewart
You can use ?autoReconnect=true in the URL - another way is to make a
simple query call on a regular (hourly?) basis just to keep the
connection alive (e.g. SELECT * { <http://example/junk>
<http://example/junk> <http://example/junk> }).
(Outside Joseki, a third way is to use a connection pool - apparently
some of the connection pool systems know about this MySQL peculiarity
and manage it, only returning usable connections).
Andy