Learn about Active Record connection pooling, a performance optimization technique for Rails applications that maintains reusable database connections to reduce connection setup time. Discover the configuration options through the database.yml file, including how to handle connection timeout errors and the role of the Reaper in

12m read timeFrom bigbinary.com
Post cover image
Table of contents
Database Connection PoolingActive Record Connection Pool ImplementationConnection Pool Configuration OptionsActive Record Connection Pool ReaperWhy are idle connections bad?How many database connections will the web and background processes utilize at maximum?How load_async worksSetting Database Pool Size ConfigurationPgBouncerThe dreaded ActiveRecord::ConnectionTimeoutErrorCustom code spinning up new threads and taking up connectionsTracking down ActiveRecord::ConnectionTimeoutErrorsMonitoring Active Record Connection Pool Stats
2 Comments

Sort: