Rails 4 database connection pool error
问题 I have a rails app hosted with NGINX and Puma. Every 10 hours or so, the app becomes unusable. Whenever a user tries to connect, the following error message is displayed: Error during failsafe response: could not obtain a database connection within 5.000 seconds (waited 5.000 seconds) This continues until the app is restarted. I have read that this is because the database connection pool is full, and so there must be threads being created in the rails app that are not closing their connection