System call timeout problem


#1

Hallo,

I upgraded from rails 1.1.x to rails 1.2.x und the following error now
occours.
I do a system call, that transfers a file via lftp:
lftp -f #{dir}script
Which just executes lftp with a script file as a parameter. This works
fine and the file transfer is executed correctly, but I now get after
about 2000ms the following errors im my application:

In the Browser:
the standard “rails application failed” error

In the error logs:
SystemExit (exit):
/var/lib/gems/1.8/gems/rails-1.2.1/lib/fcgi_handler.rb:116:in
exit' /var/lib/gems/1.8/gems/rails-1.2.1/lib/fcgi_handler.rb:116:inexit_now_handler’
/var/lib/gems/1.8/gems/activesupport-1.4.0/lib/active_support/
inflector.rb:251:in to_proc' /var/lib/gems/1.8/gems/activesupport-1.4.0/lib/active_support/ core_ext/kernel/agnostics.rb:7:incall’
/var/lib/gems/1.8/gems/activesupport-1.4.0/lib/active_support/
core_ext/kernel/agnostics.rb:7:in ' /var/lib/gems/1.8/gems/activesupport-1.4.0/lib/active_support/ core_ext/kernel/agnostics.rb:7:in
/app/models/quikftp.rb:86:in copyFile' /app/controllers/quikftp_controller.rb:106:incopyFile’
/var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/
base.rb:1095:in send' /var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ base.rb:1095:inperform_action_without_filters’
/var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/
filters.rb:632:in call_filter' /var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ filters.rb:638:incall_filter’
/var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/
filters.rb:438:in call' /var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ filters.rb:637:incall_filter’
/var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/
filters.rb:619:in perform_action_without_benchmark' /var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ benchmarking.rb:66:inperform_action_without_rescue’
/usr/lib/ruby/1.8/benchmark.rb:293:in measure' /var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ benchmarking.rb:66:inperform_action_without_rescue’
/var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/
rescue.rb:83:in perform_action' /var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ base.rb:430:insend’
/var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/
base.rb:430:in process_without_filters' /var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ filters.rb:624:inprocess_without_session_management_support’
/var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/
session_management.rb:114:in process' /var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ base.rb:330:inprocess’
/var/lib/gems/1.8/gems/rails-1.2.1/lib/dispatcher.rb:41:in
dispatch' /var/lib/gems/1.8/gems/rails-1.2.1/lib/fcgi_handler.rb:168:inprocess_request’
/var/lib/gems/1.8/gems/rails-1.2.1/lib/fcgi_handler.rb:143:in
process_each_request!' /var/lib/gems/1.8/gems/rails-1.2.1/lib/fcgi_handler.rb:109:inwith_signal_handler’
/var/lib/gems/1.8/gems/rails-1.2.1/lib/fcgi_handler.rb:142:in
process_each_request!' /usr/lib/ruby/1.8/fcgi.rb:612:ineach_cgi’
/usr/lib/ruby/1.8/fcgi.rb:609:in each' /usr/lib/ruby/1.8/fcgi.rb:609:ineach_cgi’
/var/lib/gems/1.8/gems/rails-1.2.1/lib/fcgi_handler.rb:141:in
process_each_request!' /var/lib/gems/1.8/gems/rails-1.2.1/lib/fcgi_handler.rb:55:inprocess!’
/var/lib/gems/1.8/gems/rails-1.2.1/lib/fcgi_handler.rb:25:in
`process!’
/home/arne/www/mpaiplus.com/http/back/public/dispatch.fcgi:24

Does anybody have an idia what this is about?
Any help is strongly appreciated.

migo


#2

On 2/11/07, migo removed_email_address@domain.invalid wrote:

inflector.rb:251:in to_proc' /var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ filters.rb:619:inperform_action_without_benchmark’
base.rb:430:in process_without_filters' /var/lib/gems/1.8/gems/rails-1.2.1/lib/fcgi_handler.rb:143:in /var/lib/gems/1.8/gems/rails-1.2.1/lib/fcgi_handler.rb:55:inprocess!’
/var/lib/gems/1.8/gems/rails-1.2.1/lib/fcgi_handler.rb:25:in
`process!’
/home/arne/www/mpaiplus.com/http/back/public/dispatch.fcgi:24

Does anybody have an idia what this is about?
Any help is strongly appreciated.

Its extremely insert your favorite profanity here to do that. Rails
work on the assumption that all your actions return/render fast and do
not block. What your probably want is to offload this ftp thingy to a
background process.

Most likely backgroundrb is suited for this kinda stuff. there is a
seperate mailing list for backgroundrb, shoot a mail if you can’t
figure this out.


gnufied

There was only one Road; that it was like a great river: its springs
were at every doorstep, and every path was its tributary.


#3

Thanks for the advice!
the ftp transfer is actually called as an ajax function, so the
application itself doesnt block (other ajax call check the progress on
the ftp transfer).
I will have a look at the backgroundrb stuff.