Repository is archived
No commit activity in last 3 years
No release in over 3 years
ActiveRecord Serverless handle AWS Aurora Serverless
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0
~> 0.12
~> 10.0
~> 0.16
~> 1.3

Runtime

>= 4.0.0, < 7.0
>= 4.0.0, < 7.0
 Project Readme

ActiveRecordServerless

Handles database connection's to disconnect on a timeout. This allows Aurora Serverless servers to spin down.

Installing

In a Gemfile

gem 'active_record_serverless'

Manually

gem install active_record_serverless

Config

# in config/database.yml
development:
  # other db params
  serverless:
    timeout: 60.0 # Timeout every 60 seconds.

Forking

after_fork do
  ActiveRecordServerless.start_timeout
end

Non-Rails Application.

Setup

ActiveRecordServerless::Installer.install!(nil)