max_user_connections error from script/console

Subscribe to max_user_connections error from script/console 1 post(s), 1 voice(s)

 
Avatar Tobin Harris 1 post(s)

Hi folks

We’re seeing the following error when doing any ActiveRecord queries in script/console production.

script/console production
Loading production environment (Rails 2.3.5) 
>> a = ActiveRecord::Base.connection.execute('select * from Users limit 1')
Mysql::Error: User 'newmans' has exceeded the 'max_user_connections' resource (current value: 5)

In the database.yml, we have

host: db02.mysql.vm.brightbox.net
pool: 5

I’d expect the Rails web app will release any connections back to the pool after each request, rather than hoarding them? And, the MySQL driver should take care of any resource allocation/deallocation?

Any help appreciated

Tobin

Signup or login to contribute