Skip to content

RMySQL cannot allocate a new connection

4 messages · Paul Gilbert, Dirk Eddelbuettel

#
I have recently started getting error messages

Error: RS-DBI driver: (d/mysqld.sockcannot allocate a new connection -- 
maximum
of 16 connections already opened)

The server has a max connections set to 500, which is verified from the 
R session with

    mysqlQuickSQL(ets, "show variables;")

so the error message does not seem to be reflecting the real problem. I 
am also getting

Warning in mysqlQuickSQL(conn, statement, ...) : pending rows
Warning in mysqlFetch(res, n, ...) :
   RS-DBI driver warning: (error while fetching rows)

I am using  RMySQL 0.9-3 (on Ubuntu)  and am now using R-3.0.0 but the 
problem started before the new R version.  The same code did work in the 
past (circa Dec 2012), but I'm not certain about the version numbers 
then. I've probably upgraded my server since then too.

Does anyone know how to deal with this, or what the cause is?

Is anyone else having a similar problem?

Thanks,
Paul
#
Paul,

I also bit me recently; can't quite recall the circumstances but it was
somehow related to an error.  What binds here, as far as a I know, is the
'open files' constraint from the OS and shell, not so much R's.

I do not know a way to increase it on a running session. Sorry.

Hth, Dirk
#
But I cannot think why it would have just started. I've been running 
this code for years. I'm suspicious of the warning about pending rows, I 
have not seen that before either.  Do you know if the size of returned 
chunks is controlled at the client or server side, or both?

Thanks,
Paul
On 13-04-05 02:09 PM, Dirk Eddelbuettel wrote:
#
On 5 April 2013 at 14:55, Paul Gilbert wrote:
| But I cannot think why it would have just started. I've been running 
| this code for years. I'm suspicious of the warning about pending rows, I 
| have not seen that before either.  Do you know if the size of returned 
| chunks is controlled at the client or server side, or both?

Sorry -- I should have clarified that my 'cannot allocate new connection'
what not related to MySQL which I don't use often.

Dirk