Forum: Ruby on Rails Dissecting an SystemExit

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
3b1daae9f655c5dba51ff1cdf03f1bef?d=identicon&s=25 Martin Stabenfeldt (Guest)
on 2007-03-31 09:58
(Received via mailing list)
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:in `exit_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:in `call'
    /usr/local/lib/ruby/1.8/net/http.rb:560:in `initialize'
    /usr/local/lib/ruby/1.8/net/http.rb:560:in `open'
    /usr/local/lib/ruby/1.8/net/http.rb:560:in `connect'
    /usr/local/lib/ruby/1.8/timeout.rb:48:in `timeout'
    /usr/local/lib/ruby/1.8/timeout.rb:76:in `timeout'
    /usr/local/lib/ruby/1.8/net/http.rb:560:in `connect'
    /usr/local/lib/ruby/1.8/net/http.rb:553:in `do_start'
    /usr/local/lib/ruby/1.8/net/http.rb:542:in `start'
    /usr/local/lib/ruby/1.8/net/http.rb:379:in `get_response'
    /usr/local/lib/ruby/1.8/net/http.rb:356:in `get'
    /app/controllers/sms_controller.rb:98:in `sms'
    /app/controllers/sms_controller.rb:53:in `send_sms'
    /app/controllers/sms_controller.rb:52:in `each'
    /app/controllers/sms_controller.rb:52:in `send_sms'
    /vendor/rails/actionpack/lib/action_controller/base.rb:941:in `send'
    /vendor/rails/actionpack/lib/action_controller/base.rb:941:in
`perform_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:in
`perform_action_without_rescue'
    /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'
    /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:in
`perform_action_without_rescue'
    /vendor/rails/actionpack/lib/action_controller/rescue.rb:82:in
`perform_action'
    /vendor/rails/actionpack/lib/action_controller/base.rb:408:in `send'
    /vendor/rails/actionpack/lib/action_controller/base.rb:408:in
`process_without_filters'
    /vendor/rails/actionpack/lib/action_controller/filters.rb:377:in
`process_without_session_management_support'

/vendor/rails/actionpack/lib/action_controller/session_management.rb:117:in
`process'
    /vendor/rails/railties/lib/dispatcher.rb:38:in `dispatch'
    /vendor/rails/railties/lib/fcgi_handler.rb:150:in `process_request'
    /vendor/rails/railties/lib/fcgi_handler.rb:54:in `process!'
    /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:in
`each'
    /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:in `process!'
    /vendor/rails/railties/lib/fcgi_handler.rb:23:in `process!'
    dispatch.fcgi:28


Cheers,
Martin Stabenfeldt
Dfd6f9989147955682701da8227df8b4?d=identicon&s=25 Michael Wang (Guest)
on 2007-04-01 04:07
(Received via mailing list)
Martin Stabenfeldt 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 Wang
This topic is locked and can not be replied to.