Skip to content

Instantly share code, notes, and snippets.

@tbuehlmann
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tbuehlmann/9545861 to your computer and use it in GitHub Desktop.
Save tbuehlmann/9545861 to your computer and use it in GitHub Desktop.
(Satellite::Application.config.database_configuration['development']['pool'] + 1).times do
Thread.new do
Thread.abort_on_exception = true
ActiveRecord::Base.connection
sleep
end
end
# => 26
# [2] pry(main)> Error: could not obtain a database connection within 5.000 seconds (waited 5.000 seconds)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment