Dissecting an SystemExit


#1

Hi,

I´m doing about 300 Net::HTTP.get URI.parse(url) from a for-loop.
But the loop didn´t get trough more than 150 gets before I got an
ApplicationError.
How do I dissect the output from the development.log?
I see that timeout is listed a few times, did the application die
because of
a http-get timeout?

SystemExit (exit):
/vendor/rails/railties/lib/fcgi_handler.rb:126:in exit' /vendor/rails/railties/lib/fcgi_handler.rb:126:inexit_now_handler’
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
to_proc' /usr/local/lib/ruby/1.8/net/http.rb:560:incall’
/usr/local/lib/ruby/1.8/net/http.rb:560:in initialize' /usr/local/lib/ruby/1.8/net/http.rb:560:inopen’
/usr/local/lib/ruby/1.8/net/http.rb:560:in connect' /usr/local/lib/ruby/1.8/timeout.rb:48:intimeout’
/usr/local/lib/ruby/1.8/timeout.rb:76:in timeout' /usr/local/lib/ruby/1.8/net/http.rb:560:inconnect’
/usr/local/lib/ruby/1.8/net/http.rb:553:in do_start' /usr/local/lib/ruby/1.8/net/http.rb:542:instart’
/usr/local/lib/ruby/1.8/net/http.rb:379:in get_response' /usr/local/lib/ruby/1.8/net/http.rb:356:inget’
/app/controllers/sms_controller.rb:98:in sms' /app/controllers/sms_controller.rb:53:insend_sms’
/app/controllers/sms_controller.rb:52:in each' /app/controllers/sms_controller.rb:52:insend_sms’
/vendor/rails/actionpack/lib/action_controller/base.rb:941:in send' /vendor/rails/actionpack/lib/action_controller/base.rb:941:inperform_action_without_filters’
/vendor/rails/actionpack/lib/action_controller/filters.rb:368:in
perform_action_without_benchmark' /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:inperform_action_without_rescue’
/usr/local/lib/ruby/1.8/benchmark.rb:293:in measure' /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:inperform_action_without_rescue’
/vendor/rails/actionpack/lib/action_controller/rescue.rb:82:in
perform_action' /vendor/rails/actionpack/lib/action_controller/base.rb:408:insend’
/vendor/rails/actionpack/lib/action_controller/base.rb:408:in
process_without_filters' /vendor/rails/actionpack/lib/action_controller/filters.rb:377:inprocess_without_session_management_support’

/vendor/rails/actionpack/lib/action_controller/session_management.rb:117:in
process' /vendor/rails/railties/lib/dispatcher.rb:38:indispatch’
/vendor/rails/railties/lib/fcgi_handler.rb:150:in process_request' /vendor/rails/railties/lib/fcgi_handler.rb:54:inprocess!’
/usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:612:in
each_cgi' /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:ineach’
/usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:in
each_cgi' /vendor/rails/railties/lib/fcgi_handler.rb:53:inprocess!’
/vendor/rails/railties/lib/fcgi_handler.rb:23:in `process!’
dispatch.fcgi:28

Cheers,
Martin S.


#2

Martin S. wrote:

Hi,

I´m doing about 300 Net::HTTP.get URI.parse(url) from a for-loop.
But the loop didn´t get trough more than 150 gets before I got an
ApplicationError.
How do I dissect the output from the development.log?
I see that timeout is listed a few times, did the application die because of
a http-get timeout?

Could be. You could try wrapping your call around a begin rescue block
and see if the exception bubbles all the way up to the top.


Michael W.