|
Re: [jruby-user] Re: Super-simple DRb server hangs in JRuby (but not in C R: msg#00170lang.jruby.user
FYI: whatever it is, it's been fixed in 1.1b1 On Nov 19, 2007 7:23 PM, Scott Davies <scottd@xxxxxxxxx> wrote: > Sorry, I should've been more specific about the test scenario: this > was on a Mac running Leopard, using JRuby 1.0.2. > > -- Scott > > > On Nov 19, 2007 4:21 PM, Scott Davies <scottd@xxxxxxxxx> wrote: > > Hi -- > > > > I just tried writing a Lucene indexserver running in DRb under JRuby, > > and immediately ran into a problem where the server would very quickly > > hang if I tried to throw requests at it from more than one client > > simultaneously. So, I yanked out all the Lucene stuff to diagnose the > > problem, and sure enough, the problem has nothing to do with Lucene > > and everything to do with JRuby and DRb. Here's the test code in its > > entirety: > > > > ------------------------------------------------ > > # test_server > > #!/usr/bin/env jruby > > require 'drb' > > > > class PingPong > > def ping > > "pong" > > end > > end > > > > DRb.start_service("druby://127.0.0.1:4323", PingPong.new) > > DRb.thread.join > > ------------------------------------------------- > > # test_client > > #!/usr/bin/env jruby > > require 'drb' > > > > pingpong = DRbObject.new(nil, "druby://127.0.0.1:4323") > > > > i = 0 > > while true > > i = i+1 > > pong = pingpong.ping > > puts pong + " " + i.inspect > > end > > -------------------------------------------------- > > > > Everything works OK if I start one test_server process and then one > > test_client process. When I start up a second simultaneous > > test_client process, though, within a few requests everything comes to > > a screeching halt: the server fails to respond to any further > > requests. (Killing the clients and starting another doesn't help: the > > server's still locked up.) > > > > If I use C Ruby for the server instead of JRuby, though, then > > everything works fine. > > > > Am I missing something? Is there a workaround for this problem? Or > > is JRuby almost entirely useless for DRb? :-( > > > > Thanks, > > > > -- Scott > > > > --------------------------------------------------------------------- > To unsubscribe from this list please visit: > > http://xircles.codehaus.org/manage_email > > --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [jruby-user] Wiki moved to jruby.org subdomain: 00170, Charles Oliver Nutter |
|---|---|
| Next by Date: | Re: [jruby-user] Re: Super-simple DRb server hangs in JRuby (but not in C Ruby) when hit with multiple simultaneous requests: 00170, Scott Davies |
| Previous by Thread: | [jruby-user] Re: Super-simple DRb server hangs in JRuby (but not in C Ruby) when hit with multiple simultaneous requestsi: 00170, Scott Davies |
| Next by Thread: | Re: [jruby-user] Re: Super-simple DRb server hangs in JRuby (but not in C Ruby) when hit with multiple simultaneous requests: 00170, Scott Davies |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |