These are chat archives for codebar/tutorials

22nd
Apr 2014
Camille Baldock
@camilleldn
Apr 22 2014 10:45
codebar.io seems to be down :-( happy to help with fix...
my heroku username is camille@camillebaldock.co.uk
Despo Pentara
@despo
Apr 22 2014 12:06
@camilleldn :( i just restarted the server which sorted it out
2014-04-22T12:05:21.914433+00:00 app[web.1]: ActiveRecord::ConnectionTimeoutError (could not obtain a database connection within 5.000 seconds (waited 5.000 seconds)):
2014-04-22T12:05:21.914427+00:00 app[web.1]:
2014-04-22T12:05:21.914442+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/monitor.rb:211:in mon_synchronize' 2014-04-22T12:05:21.914445+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:146:insynchronize'
2014-04-22T12:05:21.914455+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
this is the second time this happens in the last couple of days, i think caused because we are running out of connections.
Daniel Barber
@danbee
Apr 22 2014 14:29
@despo You need to make sure that you're not firing up more processes than you've got available database connections
Baris Balic
@barisbalic
Apr 22 2014 14:30
I would have thought that heroku managed taht?
Daniel Barber
@danbee
Apr 22 2014 14:31
Nope
Baris Balic
@barisbalic
Apr 22 2014 14:33
Last time I was at their offices they were talking about injecting thin automagically because so many people would let WEBRick linger about, if they are doing that it would make sense to restrict the number of connections at the same time
Although I never checked to see if they did in the end, so thats a moot point
Daniel Barber
@danbee
Apr 22 2014 14:34
It's difficult to do that because the maximum potential connections is dependent on the number of dyno's and threads/processes per dyno
If you decide to have 4 threads per dyno, you'll hit the limit of the hobby tiers with 5 dynos
Baris Balic
@barisbalic
Apr 22 2014 14:36
I feel like this is drifting off topic for the tutorials channel, I also dont know enough about thin to make any statements
Despo Pentara
@despo
Apr 22 2014 14:37
sorry im not participating a bit busy with some other stuff atm
Daniel Barber
@danbee
Apr 22 2014 14:37
No worries
Daniel Barber
@danbee
Apr 22 2014 14:39
404 for me :(
Despo Pentara
@despo
Apr 22 2014 14:40
oh i privated it accidentally and cant change permissions.