Logging In Passenger

456 views
Skip to first unread message

Tyler DeWitt

unread,
Feb 13, 2012, 6:23:41 PM2/13/12
to Phusion Passenger Discussions
My apache2/error.log only shows cache misses and log/production.log
only sporadically gets log messages. I set log level in environments/
production.rb to debug and set the PassengerLogLevel to 2 in my
VirtualHost file. I'm getting more information in apache2/error.log,
but just general passenger info, nothing like what appears in logs/
development.rb.

Do I need to configure something?

Thanks

Hongli Lai

unread,
Feb 14, 2012, 5:47:04 PM2/14/12
to phusion-...@googlegroups.com

No. Anything the application prints to stderr will end up in the
Apache global error log. Any Phusion Passenger-related messages are
also printed to the Apache global error log. Everything else is
printed to the Rails log (e.g. log/production.log).

What kind of things do you see in log/production.log?

--
Phusion | Ruby & Rails deployment, scaling and tuning solutions

Web: http://www.phusion.nl/
E-mail: in...@phusion.nl
Chamber of commerce no: 08173483 (The Netherlands)

Tyler DeWitt

unread,
Feb 15, 2012, 11:00:24 AM2/15/12
to phusion-...@googlegroups.com
The only thing that gets logged is recompilation messages when I run 'rake assets:precompile'. For a few minutes I was (sporadically) getting messages like the following:

Started GET "/stuff" for 99.58.156.110 at 2012-02-13 23:01:14 +0000

ActionController::RoutingError (No route matches [GET] "/stuff"):
actionpack (3.2.1) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
actionpack (3.2.1) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.1) lib/rails/rack/logger.rb:26:in `call_app'
railties (3.2.1) lib/rails/rack/logger.rb:16:in `call'
actionpack (3.2.1) lib/action_dispatch/middleware/request_id.rb:22:in `call'
rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
rack (1.4.1) lib/rack/runtime.rb:17:in `call'
activesupport (3.2.1) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.4.1) lib/rack/lock.rb:15:in `call'
rack-cache (1.1) lib/rack/cache/context.rb:132:in `forward'
rack-cache (1.1) lib/rack/cache/context.rb:241:in `fetch'
rack-cache (1.1) lib/rack/cache/context.rb:181:in `lookup'
rack-cache (1.1) lib/rack/cache/context.rb:65:in `call!'
rack-cache (1.1) lib/rack/cache/context.rb:50:in `call'
railties (3.2.1) lib/rails/engine.rb:479:in `call'
railties (3.2.1) lib/rails/application.rb:220:in `call'
railties (3.2.1) lib/rails/railtie/configurable.rb:30:in `method_missing'
passenger (3.0.11) lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
passenger (3.0.11) lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'
passenger (3.0.11) lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
passenger (3.0.11) lib/phusion_passenger/rack/application_spawner.rb:206:in `start_request_handler'
passenger (3.0.11) lib/phusion_passenger/rack/application_spawner.rb:171:in `block in handle_spawn_application'
passenger (3.0.11) lib/phusion_passenger/utils.rb:479:in `safe_fork'
passenger (3.0.11) lib/phusion_passenger/rack/application_spawner.rb:166:in `handle_spawn_application'
passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:180:in `start'
passenger (3.0.11) lib/phusion_passenger/rack/application_spawner.rb:129:in `start'
passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:253:in `block (2 levels) in spawn_rack_application'
passenger (3.0.11) lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:246:in `block in spawn_rack_application'
passenger (3.0.11) lib/phusion_passenger/abstract_server_collection.rb:82:in `block in synchronize'
<internal:prelude>:10:in `synchronize'
passenger (3.0.11) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:244:in `spawn_rack_application'
passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:137:in `spawn_application'
passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
passenger (3.0.11) helper-scripts/passenger-spawn-server:99:in `<main>'

In this case, a 'stuff' controller didn't exist. I never got successive routing messages. Also, apache2/error.log only displays:

cache: [GET /] miss

type messages

I was forgetting to precompile my assets for a while, and no error was showing up until I ran in development mode.

Is Rails 3.2.1 supported?

Thanks for all the help,
Tyler

> --
> You received this message because you are subscribed to the Google Groups "Phusion Passenger Discussions" group.
> To post to this group, send email to phusion-...@googlegroups.com.
> To unsubscribe from this group, send email to phusion-passen...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/phusion-passenger?hl=en.
>

Hongli Lai

unread,
Feb 15, 2012, 11:48:50 AM2/15/12
to phusion-...@googlegroups.com

All Rails versions are supported.

Sent from my Android phone.

Op 15 feb. 2012 17:01 schreef "Tyler DeWitt" <tyler.sco...@gmail.com> het volgende:

Tyler DeWitt

unread,
Feb 15, 2012, 6:36:44 PM2/15/12
to phusion-...@googlegroups.com
Looks like somebody else is having this logging issue with Rails 3.2.1 and the newest Passenger. http://stackoverflow.com/questions/9270775/rails-logging-in-production-environment

Any ideas on where to start debugging?
Reply all
Reply to author
Forward
0 new messages