Michael Larocque
2006-Dec-19 17:34 UTC
determining what mongrel port a request is serviced by
Hi folks, We''re using mongrel_cluster for our app. For debugging purposes, we''d like to determine which mongrel port an individual request is being serviced by. This code: def host_port @request.host + ":" + @request.port.to_s end returns 1.2.3.4:80 What I''d like is this, for example 1.2.3.4:8004 Any thoughts? Carpe viam, Mike Michael Larocque Chief Cook and Bottle Washer Prolumina Communications Inc. http://prolumina.com/~mlarocque/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Philip Hallstrom
2006-Dec-19 18:28 UTC
Re: determining what mongrel port a request is serviced by
> We''re using mongrel_cluster for our app. For debugging purposes, we''d > like to determine which mongrel port an individual request is being > serviced by. > > This code: > > def host_port > @request.host + ":" + @request.port.to_s > end > > returns > > 1.2.3.4:80 > > What I''d like is this, for example > > 1.2.3.4:8004 > > Any thoughts?We run mongrel behind apache 2.2 and for us ENV[SERVER_PORT] is set to the port that mongrel is listening on. I haven''t verified this, but we have that exception notifier plugin that emails when an error has occured and in that email it prints out the environment and that''s what it says. * SERVER_NAME : 127.0.0.1 * SERVER_PORT : 8002 * SERVER_PROTOCOL : HTTP/1.1 * SERVER_SOFTWARE : Mongrel 0.3.13.3 -philip --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---