drb load limit

J

jdonnell

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:in `recv_reply'
from /usr/lib/ruby/1.8/drb/drb.rb:909:in `recv_reply'
from /usr/lib/ruby/1.8/drb/drb.rb:1148:in `send_message'
from /usr/lib/ruby/1.8/drb/drb.rb:1059:in `method_missing'
from /usr/lib/ruby/1.8/drb/drb.rb:1058:in `open'
from /usr/lib/ruby/1.8/drb/drb.rb:1058:in `method_missing'
from (irb):24
 
J

Joel VanderWerf

jdonnell said:
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'

Use a number, rather than a string, here^^^^^
DRb.start_service("druby://:7777", SentenceWrapper.new, {:load_limit =>
'90214400'})

and here^^^
 
J

jdonnell

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 :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top