[Rails] Re: (Rails 2.3) Upstream mongrel cluster: how to find out mongrel instance (port) which handles request

2009-12-26 Thread Thomas
I was using the following lines in my _debug.html.erb partial: % session.cgi.inspect.split(/,/).each{ |key| @mongrel_port = key if(key =~ /@port/)} % %= @mongrel_port % Greetings, Thomas On 25 Dez., 00:41, ak ajay.ka...@gmail.com wrote: Thomas, I'm still on Rails 2.1 and would like to

[Rails] Re: (Rails 2.3) Upstream mongrel cluster: how to find out mongrel instance (port) which handles request

2009-12-24 Thread ak
Thomas, I'm still on Rails 2.1 and would like to do exactly what you were doing? What is the Rails 2.1 way? Call session.cgi.handler.listener.port ? Will that give the port number of the actual instance? On Dec 8, 3:50 pm, Thomas thomas.net...@gmail.com wrote: For debugging purpose I find it

[Rails] Re: (Rails 2.3) Upstream mongrel cluster: how to find out mongrel instance (port) which handles request

2009-12-09 Thread Thomas
Hi Kristian, this also results in port number '3000', and not in the port number of the upstream mongrel. On 9 Dez., 09:46, Kristian Hellquist kristian.hellqu...@gmail.com wrote: Cant you just do `request.server_port'  in controller? 2009/12/9 Thomas thomas.net...@gmail.com: For

Re: [Rails] Re: (Rails 2.3) Upstream mongrel cluster: how to find out mongrel instance (port) which handles request

2009-12-09 Thread Kristian Hellquist
Does request.env.inspect gives you any hint? 2009/12/9 Thomas thomas.net...@gmail.com: Hi Kristian, this also results in port number '3000', and not in the port number of the upstream mongrel. On 9 Dez., 09:46, Kristian Hellquist kristian.hellqu...@gmail.com wrote: Cant you just do

[Rails] Re: (Rails 2.3) Upstream mongrel cluster: how to find out mongrel instance (port) which handles request

2009-12-09 Thread Thomas
This helped! Though, a bit strange, the only hint for the mongrel port is in request.env[rack.errors] which is an IO object pointing the logfile of the mongrel. It is something like /somepath/mongrel.400x.log. Hence request.env[rack.errors].inspect[/mongrel\.\d+/] verboses the mongrel port of