SystemExit ... in `process!'dispatch.fcgi:28

Hi,

I’m having a loop fetching about 200 URL’s.
But after 170 gets, I get a SystemExit error.

The error is reproducible on Apache, but not on WEBrick in my
development environment. (OS X :slight_smile:

This is the part that gets the page:

 retrycount = 0
  resp = nil
  begin
    timeout(10) do
      resp = Net::HTTP.get(URI.parse(url))
      resp.to_s
      logger.debug("Sending to #{recipient}: #{resp}\n")
    end
  rescue TimeoutError
    if(retrycount < 2)
      retrycount+=1
      retry
    else
      logger.info("ERROR url: " + url)
      logger.info("ERROR Timeout error in get_page, attempt #" +

retrycount.to_s)
nil
end
end
resp.to_s
rescue Exception => exception
logger.info(“ERROR Unknown error in get_page”)
logger.info(exception.class.to_s + " " + exception.message.to_s

  • " " + exception.backtrace.to_s)
    nil
    end

ERROR Unknown error in get_page
SystemExit exit
…/config/…/vendor/rails/railties/lib/fcgi_handler.rb:126:in
exit'../config/../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’…/config/…/app/controllers/sms_controller.rb:104:in
sms'/usr/local/lib/ruby/1.8/timeout.rb:56:intimeout’/usr/local/lib/ruby/1.8/timeout.rb:76:in
timeout'../config/../app/controllers/sms_controller.rb:103:insms’…/config/…/app/controllers/sms_controller.rb:53:in
send_sms'../config/../app/controllers/sms_controller.rb:52:ineach’…/config/…/app/controllers/sms_controller.rb:52:in
send_sms'../config/../vendor/rails/actionpack/lib/action_controller/base.rb:941:insend’…/config/…/vendor/rails/actionpack/lib/action_controller/base.rb:941:in
perform_action_without_filters'../config/../vendor/rails/actionpack/lib/action_controller/filters.rb:368:inperform_action_without_benchmark’…/config/…/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:in
perform_action_without_rescue'/usr/local/lib/ruby/1.8/benchmark.rb:293:inmeasure’…/config/…/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:in
perform_action_without_rescue'../config/../vendor/rails/actionpack/lib/action_controller/rescue.rb:82:inperform_action’…/config/…/vendor/rails/actionpack/lib/action_controller/base.rb:408:in
send'../config/../vendor/rails/actionpack/lib/action_controller/base.rb:408:inprocess_without_filters’…/config/…/vendor/rails/actionpack/lib/action_controller/filters.rb:377:in
process_without_session_management_support'../config/../vendor/rails/actionpack/lib/action_controller/session_management.rb:117:inprocess’…/config/…/vendor/rails/railties/lib/dispatcher.rb:38:in
dispatch'../config/../vendor/rails/railties/lib/fcgi_handler.rb:150:inprocess_request’…/config/…/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:ineach_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:ineach_cgi’…/config/…/vendor/rails/railties/lib/fcgi_handler.rb:53:in
process!'../config/../vendor/rails/railties/lib/fcgi_handler.rb:23:inprocess!'dispatch.fcgi:28

Dont know it it matters, but line 28 in dispatch.fcgi looks like this:
RailsFCGIHandler.process!

Any suggestions on how to avoid this problem?

Best regards,
Martin S.

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