diff options
author | Eugene Kenny <elkenny@gmail.com> | 2017-02-17 23:56:48 +0000 |
---|---|---|
committer | Eugene Kenny <elkenny@gmail.com> | 2017-02-17 23:56:48 +0000 |
commit | b66b5378baf3804e9985a7cb9630f6d5a3ddcf97 (patch) | |
tree | 17880316f7a265d9f04003a4a2edcf694cf62423 /railties/lib | |
parent | c059caab7bcf40dec4902ac21cef673625da2a24 (diff) | |
download | rails-b66b5378baf3804e9985a7cb9630f6d5a3ddcf97.tar.gz rails-b66b5378baf3804e9985a7cb9630f6d5a3ddcf97.tar.bz2 rails-b66b5378baf3804e9985a7cb9630f6d5a3ddcf97.zip |
Clear active connections after initialization
Any connections that were checked out during initialization should be
checked back in before the first request is processed, for two reasons:
- Returning the connection to the pool allows it to be health checked
before it's used again. If the connection dies before the first
request arrives, the health check will replace it with a new one.
- If the thread that initialized Rails is not the same thread that will
be performing work, checking in the connection will allow it to be
reused instead of being stuck to the initialization thread forever.
Diffstat (limited to 'railties/lib')
0 files changed, 0 insertions, 0 deletions