I’m currently trying to write an application in Shiny that talks to a MySQL database. While developing I got the following error message after I has started the server a few times:

cannot allocate a new connection — maximum of 16 connections already > opened)

It turns out that the following line was opening connections and keeping them open:

mydb = dbConnect(MySQL(), user=’xxx’, password=’xxx’, dbname=’xxx’, host=’xxx’)

The solution was to loop through any connections and delete them:

cons<-dbListConnections(MySQL()) for(con in cons) dbDisconnect(con)

Categories: Technology


Vert · July 3, 2015 at 4:37 pm

That rescued my life!! Thanks very much!!!

lyx · September 12, 2017 at 9:00 am

I have find this problem for half a day,That rescued my life!! Thanks very much!!!

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *