Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Include pool size in database.yml.erb #99

Closed
wants to merge 1 commit into from

2 participants

@bartimaeus

We need pool size in the database.yml.erb otherwise we run out of database connections when scaling.

@jbraeuer
Owner

Thanks for your pull request. A change that adds support for pool size is currently on it's way to production. So consider this issue to be fixed soon.

The commit also adds support for wait_timeout. Do you require this? Searching for mysql2 and wait_timeout suggests it's use has some pitfalls. See
rails/rails#6441
rails/rails#7684

@bartimaeus

I'm okay without wait_timeout. pool size is the must have. Thanks!

@jbraeuer
Owner

Ok, then I will close this issue as pool size is currently on it's way to prod.

@jbraeuer jbraeuer closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 31, 2014
  1. @bartimaeus
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 0 deletions.
  1. +6 −0 rails/templates/default/database.yml.erb
View
6 rails/templates/default/database.yml.erb
@@ -10,5 +10,11 @@
<% if @database[:port] -%>
port: <%= @database[:port].to_i.inspect %>
<% end -%>
+<% if @database[:pool] -%>
+ pool: <%= @database[:pool].to_i.inspect %>
+<% end -%>
+<% if @database[:wait_timeout] -%>
+ wait_timeout: <%= @database[:wait_timeout].to_i.inspect %>
+<% end -%>
<% end %>
Something went wrong with that request. Please try again.