[R-sig-DB] RMySQL doesn't auto-reconnect
Jeffrey Horner
je||@horner @end|ng |rom v@nderb||t@edu
Fri Aug 28 17:21:59 CEST 2009
Jack Tanner wrote:
> After I do library(RMySQL), dbConnect(), and run a few queries, I
> sometimes get this:
>
> Error in mysqlExecStatement(conn, statement, ...) :
> RS-DBI driver: (could not run statement: MySQL server has gone away)
>
> If I issue a dbConnect() again, I can run queries again ... for a
> little while, and then I get another "server has gone away".
>
> The MySQL server is on a separate machine from the client. It's
> entirely possible that there's one or more firewalls in between, which
> could be causing the problem. The
>
> I understand that MySQL has auto-reconnect functionality:
>
> http://blog.taragana.com/index.php/archive/how-to-enable-disable-auto-reconnect-in-mysql/
>
>
> Does RMySQL allow me to turn on auto-reconnect? If so, how?
Unfortunately it doesn't right now, but that would be a great addition.
I've often had to test for the connection going away for unknown reasons
as well.
I'll pencil it in for the next release as it's easy to add.
Jeff
>
> > version
> _ platform
> i386-redhat-linux-gnu arch i386
> os linux-gnu system i386,
> linux-gnu status
> major 2 minor
> 9.1 year 2009
> month 06 day
> 26 svn rev 48839
> language R version.string R version
> 2.9.1 (2009-06-26)
> > mysqlClientLibraryVersions()
> 5.0.45 5.0.45
> 50045 50045
>
> _______________________________________________
> R-sig-DB mailing list -- R Special Interest Group
> R-sig-DB using stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-db
More information about the R-sig-DB
mailing list