From: Zed Shaw Date: 2006-05-27T02:49:29+09:00 Subject: Re: Mongrel "loopback"l request Hi Peter, On Sat, 2006-05-27 at 00:38 +0900, Peter C. Verhage wrote: > Hi, > > I'm using mongrel (the mongrel_rails wrapper to be exact) for a SOAP > server. One of the possible SOAP requests can trigger a Net::HTTP get > request to the server itself. At that time the complete server seems to > block. I suspect this has something to do with Ruby's non-native > threads, but I don't know of a way to workaround this. Any suggestions? Everyone else has already told you what's going on with Rails locking, so I'll just throw out a couple of solutions. 1) Try out mongrel_cluster as a way to easily manage a bunch of mongrels. With more than one Mongrel running you'll be able to do this no problems. Well, see below. 2) This guy walks into the doctor's office and says, "Doc, it hurts when I do this." Doctor says, "Well, don't do that." Seriously, if you have a situation where you're doing SOAP calls back to the same process I think you've got to rethink your SOAP usage. It's horribly inefficient and leads to all sorts of other problems. If you're just doing this during development then run two mongrel servers. But in production this is a sign that you've got the design wrong. #2 isn't a dodge around the threading issue. You might have legit reasons to use SOAP as a replacement for (), but in every case where I've seen SOAP used this way I've found that it was gratuitous and that a much simpler design was possible. Good luck. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/