Mysql2::Error (Too many connections)

Author: Manager Manager Displayed: 6953
Created: 01/09/2016 Updated: 01/09/2016
Version: 1
MoreLess

Mysql2::Error (Too many connections):
  mysql2 (0.3.20) lib/mysql2/client.rb:70:in `connect'
  mysql2 (0.3.20) lib/mysql2/client.rb:70:in `initialize'
  activerecord (4.2.5) lib/active_record/connection_adapters/mysql2_adapter.rb:18:in `new'
  activerecord (4.2.5) lib/active_record/connection_adapters/mysql2_adapter.rb:18:in `mysql2_connection'
  activerecord (4.2.5) lib/active_record/connection_adapters/abstract/connection_pool.rb:438:in `new_connection'
  activerecord (4.2.5) lib/active_record/connection_adapters/abstract/connection_pool.rb:448:in `checkout_new_connection' ...

 

May occur on older VMs provided by Easy Software. You need to raise the maximal number of connections in MySQL setting.

Setting is in v /etc/my.cnf or /etc/mysql/my.cnf

[mysqld]

max_connections = 100

 

Restart mysql afterwards.

sudo service mysql restart

Add picture from clipboard