mysql2
mysql2 copied to clipboard
Problem with Aborted_clients
I have a problem with mysql2 gem 0.3.21 with ever-increasing Aborted_clients values. My rails version is 3.2.22. sudo mysql -e "SHOW GLOBAL STATUS LIKE 'aborted_clients'"; +-----------------+-------+ | Variable_name | Value | +-----------------+-------+ | Aborted_clients | 260 | +-----------------+-------+
>> Mysql2::Client.new(host: "localhost", username: "root").close
>> Mysql2::Client.new(host: "localhost", username: "root").close
>> Mysql2::Client.new(host: "localhost", username: "root").close
sudo mysql -e "SHOW GLOBAL STATUS LIKE 'aborted_clients'"; +-----------------+-------+ | Variable_name | Value | +-----------------+-------+ | Aborted_clients | 263 | +-----------------+-------+ It brings a lot of problems such as big log file and sadness my boss. Our project has a lot of db requests. I can not use a different version of rails, since it is associated with long-term project migration.
This is fixed in #606. I don't think it was backported to 0.3.x
though.
That would be great. There are many projects that run on older versions of ror. And I know it was broken in the 0.3.15 version.
2 years later, and I'm still getting this (with version 0.5.2
) :(
Me too with version 0.5.3
on rails 5.2
. This is not really a problem in itself as the log verbosity can be adjusted, but I noticed that consequently, the mysql connection does not get closed either when a unicorn process is killed due to a timeout, which under heavy load means that the maximum number of connections is not bounded and ends up reaching any given limit very quickly.
@danielristic Did you found any solution for it? I'm using same versions - 0.5.3
on rails 5.2
- and still getting this error