Thanks for the prompt response ... I'm not sure why kill -QUIT <process_id>
didn't give me a thread dump; but I'll try setting the number of runtimes -
that had not occurred to me to try. Currently I do not set the number of
runtimes; is the default 1? If so that might explain it.  What is the
recommended min/max number of runtimes?

Thanks again


Nick Sieger-2 wrote:
> 
> On Fri, Jan 15, 2010 at 1:10 PM, oaw <[email protected]> wrote:
>>
>> I'm on JRuby 1.4.0 (JDK version 1.6.0_17). The following code hangs my
>> JRuby
>> on Rails app.
>>
>> require 'net/http'
>> require 'timeout'
>>
>> begin
>>   Timeout::timeout(5) do
>>       res =
>> Net::HTTP.get_response("http://localhost:8080/projects/1/email_approved";)
>>       res.body
>> rescue Exception => e
>>       RAILS_DEFAULT_LOGGER.error e
>>       RAILS_DEFAULT_LOGGER.error e.backtrace.join('\n\t')
>> end
>>
>> Non-local URLs work; only local URLs hang. It works fine in MRI Ruby.
>> I've
>> tried to resolve this for days with no success. Googling around, I found
>> that timeout.rb is not reliable in previous versions of JRuby, so I
>> upgraded
>> to JRuby 1.4.0 but I still have this problem.
>>
>> Could someone please help? It would be greatly appreciated. I am at a
>> complete loss.
> 
> Does your HTTP request loop back around to the same application that
> is executing the request? Perhaps your app is pinned on a small number
> of runtimes the extra request is waiting to acquire one. You could try
> sending a QUIT signal to the process to generate a thread dump to see
> what might be waiting and where.
> 
> Does it hang forever? Timeout.timeout doesn't help? Does your
> appserver allow user-created threads?
> 
> I gave you more questions than answers, but hopefully helps you narrow
> down the problem.
> 
> /Nick
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Net%3A%3AHTTP-hangs-in-JRuby-on-Rails-app---please-help%21-tp27181232p27181845.html
Sent from the JRuby - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to