Drb load limit

I am trying to get a simple drb server/client to work, but I am getting

DRb::DRbConnError: too large packet 50331648
and can’t figure out why. Anyone have any ideas? my code follows

server

class SentenceWrapper
def random(ind)
return ‘hi’
end
end
DRb::DRbServer.default_load_limit ‘90214400’
DRb.start_service(“druby://:7777”, SentenceWrapper.new, {:load_limit =>
‘90214400’})
puts DRb.uri
DRb.thread.join

client

irb(main):023:0> ro = DRbObject.new(nil, ‘druby://localhost:7777’)
=> #<DRb::DRbObject:0x46d254 @ref=nil, @uri=“druby://localhost:7777”>
irb(main):024:0> ro.random(1)
DRb::DRbConnError: too large packet 50331648
from /usr/lib/ruby/1.8/drb/drb.rb:570:in load' from /usr/lib/ruby/1.8/drb/drb.rb:620:inrecv_reply’
from /usr/lib/ruby/1.8/drb/drb.rb:909:in recv_reply' from /usr/lib/ruby/1.8/drb/drb.rb:1148:insend_message’
from /usr/lib/ruby/1.8/drb/drb.rb:1059:in method_missing' from /usr/lib/ruby/1.8/drb/drb.rb:1058:inopen’
from /usr/lib/ruby/1.8/drb/drb.rb:1058:in `method_missing’
from (irb):24

jdonnell wrote:

end
end
DRb::DRbServer.default_load_limit ‘90214400’

Use a number, rather than a string, here^^^^^

DRb.start_service(“druby://:7777”, SentenceWrapper.new, {:load_limit =>
‘90214400’})

and here^^^

now it just hangs there and does nothing :frowning:

ok, for some reason it doesn’t work if I run the server on my laptop,
but I works just fine if the server is run elsewhere. Thanks for the
help :slight_smile: