Is mysqlplus a better adapter than ruby ​​mysql?

I want to know if mysqlplus gem is a better database driver than regular Ruby mysql gem? I used to have some problems in a Rails application, for example: ActiveRecord :: StatementInvalid: Mysql :: Error: MySQL server was gone

+3
source share
3 answers

MySQL server has gone awaymeans that either the MySQL server crashed the execution of the query or (most often) you sent it a quert, which is more than max_allowed_packet. see http://dev.mysql.com/doc/refman/5.1/en/packet-too-large.html

+1
source

, "mysql server has away away" , activerecord . , .

checkout http://blog.new-bamboo.co.uk/2010/4/11/automatic-reconnection-of-mysql-connections-in-active-record .

mysqlplus , concurrency, :-) , .

+1

mysql . 'wait_timeout'.
mysql :
mysql > wait_timeout

8 . , , .

Activerecord ActiveRecord:: Base # verify_active_connections! . reconnect: true database.yml, .

, , .

, wait_timeout. mysql. : http://gist.github.com/238999 ​​, , , .

0

Source: https://habr.com/ru/post/1724643/


All Articles