LoginSignup
4
4

More than 5 years have passed since last update.

RMySqlでclose出来ない接続を解除する

Posted at

適当な覚え書き。
RMySQLを利用していて以下のエラーに遭遇しました。

mysqlNewConnection(drv, ...) : 
  RS-DBI driver: (cannot allocate a new connection -- maximum of 16 connections already opened)

接続が解除されていないみたいだったので

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

としたのですが

unable to find an inherited method for function 'dbDisconnect' for
## signature '"MySQLConnection"'

となってしまったので

cons <- dbListConnections(MySQL())
for(con in cons){
  mysqlCloseConnection(con)
}

で回避しました。

4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4