Database.yml in Rails reconnect set to true or false

The database.ymldefault values ​​for reconnectRails 3 and 4 are false. What is the general setting, and in what circumstances should we set it to true? Thanks.

+4
source share
1 answer

You can set it to true. This parameter was introduced in Rails 2.3.

MySQL supports the reconnect flag in its connections - if set to true, the client will try to reconnect to the server before abandoning it in case of a lost connection. Now you can set reconnect = true for your MySQL connections in database.yml to get this behavior from a Rails application.

Team

Rails "false", .

, reconnect = true. . MySQL , .

, - reset.

, , . , , , , , .

:

2.3

mysql-reconnect-value-doesnt-stick

fooobar.com/questions/423150/...

+11

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


All Articles