In graph_controller.rb: elsif target == "memory" dd "ding 9" #increments = @pool.hosts.total_memory / 512 0.upto(@pool.hosts.total_memory) { |x| if x % 1024 == 0 scale.push((x / 1024).to_s) # divide by 1024 to convert to MB end } (the dd is my debugging method) Looks like this is infinite-looping. I'll just disable this block while I'm fiddling with this code since I'm going to rewrite much of this file anyway (as opposed to patching this). --Steve
Pursuant to my previous email with same subject line... Here's a bit of follow-up information. The 0.upto(@pool.hosts.total_memory) { |x| if x % 1024 == 0 scale.push((x / 1024).to_s) # divide by 1024 to convert to MB end } block eventually completes, after several minutes, before which the request times out. On my setup, @pool.hosts.total_memory is 522555392. There's no infinite loop. --Steve
On Tue, Jul 29, 2008 at 10:00:33AM -0500, Steve Linabery wrote:> > In graph_controller.rb: > > elsif target == "memory" > dd "ding 9" > #increments = @pool.hosts.total_memory / 512 > 0.upto(@pool.hosts.total_memory) { |x| > if x % 1024 == 0 > scale.push((x / 1024).to_s) # divide by 1024 to convert to MB > end > } > > (the dd is my debugging method) > > Looks like this is infinite-looping. I'll just disable this block while I'm fiddling with this code since I'm going to rewrite much of this file anyway (as opposed to patching this).Well done my man. Did you get your logging thing worked out finally? I know 0 about Rails logging so I couldn't help you there. --H