timeout error


I am donig a rather long script execution via script/runner (quering a
xmlrpc webservice).
After about 5 minutes the execution stops raising the following error.

/usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/runner.rb:47: /
usr/lib/ruby/1.8/timeout.rb:54:in `rbuf_fill': execution expired
        from /usr/lib/ruby/1.8/timeout.rb:56:in `timeout'
        from /usr/lib/ruby/1.8/timeout.rb:76:in `timeout'
        from /usr/lib/ruby/1.8/net/protocol.rb:132:in `rbuf_fill'
        from /usr/lib/ruby/1.8/net/protocol.rb:116:in `readuntil'
        from /usr/lib/ruby/1.8/net/protocol.rb:126:in `readline'
        from /usr/lib/ruby/1.8/net/http.rb:2017:in `read_status_line'
        from /usr/lib/ruby/1.8/net/http.rb:2006:in `read_new'
        from /usr/lib/ruby/1.8/net/http.rb:1047:in `request'
         ... 14 levels...
        from /usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/
        from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:
27:in `gem_original_require'
        from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:
27:in `require'
        from script/runner:3

I have tried to do something like:

timeout(20000) do
  #code here

but the script stoped after the same time.
Can anybody help me on this or point me into the right direction?
Thaks a lot,

I just see that the execution of a differnt rpc-function takes way
longer but toes not run into a timeout error, but finishes correctly.
The problem seems to be somewhere else.
So dont bother to answer..
I'll post the solution once I found it, just for the completion of
this thread.

I’m running into the same problem - did you ever find a solution?