Gathering statistics

In my production.log file, I’m only seeing errors and database queries,
etc.

How should I go about generating an access.log and error.log (similar
to apache). I’m interested in seeing the usual stats, request,
referer, host, user-agent.


Anthony E.
408-656-2473
http://anthony.ettinger.name

That’s all the responsibility of whatever http server you’re running.
production.log is purely what Rails itself does.

This would be for mongrel then…

On Mon, Jul 14, 2008 at 12:21 PM, Jason R. [email protected]
wrote:

referer, host, user-agent.


Anthony E.
408-656-2473
http://anthony.ettinger.name

Hmm, no, not mongrel, something like Apache, nginx, lighttp, etc.
These are your front-end http servers, and they proxy down into
Mongrel for running your Rails site.

Jason

Not using those, I’m using mongrel stand alone, as suggested in the
Deployment book.

On Mon, Jul 14, 2008 at 2:10 PM, Jason R. [email protected]
wrote:

408-656-2473
http://anthony.ettinger.name


Anthony E.
408-656-2473
http://anthony.ettinger.name

which deployment book? i would be surprised if a book about deploying
ruby
on rails suggests that you run mongrel alone in production. most
resources
that I’ve seen suggest apache or nginx proxying to mongrel. often it is
proxying to a cluster of mongrels. for one reason, mongrel is slow at
serving static files. also another issue of running mongrel alone, is
that
a mongrel can only deal with one request at a time, so of there are any
tasks that are a little long, it will block other tasks from being run.
this is why people use load-balancers to proxy to mongrel. also, using
apache or nginx gives you the logs that you are looking for. nice.

anyway, here are a few links:
http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/
http://webonrails.com/2007/02/04/apache-proxy-balancer-mongrel-clusters-and-deploying-application-with-capistrano/
http://jonathan.tron.name/2006/07/26/apache-2-0-x-mongrel-mod_proxy-mod_rewrite-configuration

here is a nice book that covers a lot about rails deployment:
http://www.pragprog.com/titles/fr_deploy/deploying-rails-applications

hope this helps,
scott

On Tue, Jul 15, 2008 at 5:15 AM, Anthony E. [email protected]

Scott,

Having Mongrel (Thin, or whatever) standing alone, not proxied

behind a full fledged web server is unusual but it works.

If you have a box with plenty of resources and a bunch of small

apps servicing not so many requests, adding a reverse proxy
arquitecture and clusters is overarquitecting.

But yes, it is unusual and if you want to gather webserver like

stats it would be better to install nginx, or you weapon of choice,
and let it take care of logging and also serving the static files.


Aníbal Rojas
http://hasmanydevelopers.com
http://rubycorner.com
http://anibal.rojas.com.ve

On Jul 15, 9:01 pm, “Scott Ballantyne” [email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs