[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

BJ - Reaping 1 threads for slow workers because of 'shutdown'

dusty

7/23/2008 6:46:00 PM

I'm calling Bj from inside a controller in rails.

# controller code
http://pastie....

Its running a simple script that logs the user to the database.
Obviously this isn't a good candidate for a background job, this is
just something simple I'm using to test.

# bj script code
http://pastie....

When I shutdown rails, I get a timeout error from mongrel

# log snippet
http://pastie....

Any ideas why mongrel is holding on to that thread? I am calling
exit_success! at the end of my run action in the bj script, it appears
the script is exiting properly.

I also find it strange that the sessions_controller is referred to in
that backtrace.

Any ideas?

Thanks
dusty doris
8 Answers

dusty

7/23/2008 7:44:00 PM

0

Here is an update. I tried in development vs production and that
didn't make a difference. However, I only saw this behavior on
mongrel. On thin and webrick it would quit quickly.

ara.t.howard

7/23/2008 8:05:00 PM

0


On Jul 23, 2008, at 1:39 PM, dusty wrote:

> Here is an update. I tried in development vs production and that
> didn't make a difference. However, I only saw this behavior on
> mongrel. On thin and webrick it would quit quickly.



it's a mongrel bug - mongrel tries to reap threads it does not own.
nothing to do with bj and you can safely ignore.

a @ http://codeforp...
--
we can deny everything, except that we have the possibility of being
better. simply reflect on that.
h.h. the 14th dalai lama




dusty

7/23/2008 8:30:00 PM

0

Great. Thanks.

BTW - I'm having fun with Bj. Thanks for writing it!

-Dusty

fowlduck

8/26/2008 9:50:00 PM

0

> it's a mongrel bug - mongrel tries to reap threads it does not own.  
> nothing to do with bj and you can safely ignore.

But what's the solution to it delaying the shutdown of mongrel?

ara.t.howard

8/26/2008 10:26:00 PM

0


On Aug 26, 2008, at 3:50 PM, fowlduck wrote:

> But what's the solution to it delaying the shutdown of mongrel?


patch mongrel.

bj doesn't delay the shutdown - it merely creates a thread which
mongrel insists on reaping. the fix is for mongrel not to reap
threads it hasn't started.

a @ http://codeforp...
--
we can deny everything, except that we have the possibility of being
better. simply reflect on that.
h.h. the 14th dalai lama




Rolling Block

6/1/2014 4:30:00 AM

0

On 5/31/2014 8:26 PM, Mr. B1ack wrote:
> On 31 May 2014 14:46:43 GMT, Boys..* wrote:
>
>>
>> http://time.com/2802038/india-rap...
>>
>> Yet again global outrage and attention are focused on India. In the
>> most recent rape-murder in Uttar Pradesh, a story of "boys will be
>> boys" unfolded in a chilling and familiar pattern. Two teenage girls
>> belonging to the Dalit caste went out to the fields because there are
>> not enough toilet facilities for women in India. They never returned.
>>
>> (For one thing, according to India's National Crime Records Bureau, three
>> to five rapes of women and girls, mostly Dalit, occur daily in Uttar
>> Pradesh alone.) We need to pay attention to-and do something about-what
>> happens in between, and what lies beneath.
>>
>> And what is that? In the context of past rapes, Mulayam Singh Yadav,
>> head of Uttar Pradesh's governing party, the Samajwadi Party, has said,
>> "Boys will be boys. They make mistakes." His statement, made in opposition
>> to the new law calling for the death penalty for gang rapes, highlights the
>> underlying social norms that contribute to most forms of violence against
>> women and girls, in India and around the world.
>
> Lacking proper "Jews" and "niggers" to look down on, ancient
> India subdivided it's own population and thus invented some
> in the form of the 'lower castes'. As this was the norm for
> thousands of years, with all Indian culture developing around
> it, steeped in it, do not expect things to change quickly there.
>
> Western egalitarian ideals are comparatively new concepts
> and will take a LONG time to penetrate Indian culture enough
> to make significant differences ... assuming they EVER
> penetrate Indian culture enough to make significant differences.
> If western culture suffers another bad economic implosion or
> two ... it, and its ideals, may simply fade away.
>

Sigh...

Back to ghee and cow-worship...

Mr. B1ack

6/1/2014 6:22:00 AM

0

On Sat, 31 May 2014 22:30:07 -0600, Rolling Block <car@bi.ne> wrote:

>On 5/31/2014 8:26 PM, Mr. B1ack wrote:
>> On 31 May 2014 14:46:43 GMT, Boys..* wrote:
>>
>>>
>>> http://time.com/2802038/india-rap...
>>>
>>> Yet again global outrage and attention are focused on India. In the
>>> most recent rape-murder in Uttar Pradesh, a story of "boys will be
>>> boys" unfolded in a chilling and familiar pattern. Two teenage girls
>>> belonging to the Dalit caste went out to the fields because there are
>>> not enough toilet facilities for women in India. They never returned.
>>>
>>> (For one thing, according to India's National Crime Records Bureau, three
>>> to five rapes of women and girls, mostly Dalit, occur daily in Uttar
>>> Pradesh alone.) We need to pay attention to-and do something about-what
>>> happens in between, and what lies beneath.
>>>
>>> And what is that? In the context of past rapes, Mulayam Singh Yadav,
>>> head of Uttar Pradesh's governing party, the Samajwadi Party, has said,
>>> "Boys will be boys. They make mistakes." His statement, made in opposition
>>> to the new law calling for the death penalty for gang rapes, highlights the
>>> underlying social norms that contribute to most forms of violence against
>>> women and girls, in India and around the world.
>>
>> Lacking proper "Jews" and "niggers" to look down on, ancient
>> India subdivided it's own population and thus invented some
>> in the form of the 'lower castes'. As this was the norm for
>> thousands of years, with all Indian culture developing around
>> it, steeped in it, do not expect things to change quickly there.
>>
>> Western egalitarian ideals are comparatively new concepts
>> and will take a LONG time to penetrate Indian culture enough
>> to make significant differences ... assuming they EVER
>> penetrate Indian culture enough to make significant differences.
>> If western culture suffers another bad economic implosion or
>> two ... it, and its ideals, may simply fade away.
>>
>
>Sigh...
>
>Back to ghee and cow-worship...


Eh ... good as anything else I suppose .............

Rolling Block

6/1/2014 4:49:00 PM

0

On 6/1/2014 12:22 AM, Mr. B1ack wrote:
> On Sat, 31 May 2014 22:30:07 -0600, Rolling Block <car@bi.ne> wrote:
>
>> On 5/31/2014 8:26 PM, Mr. B1ack wrote:
>>> On 31 May 2014 14:46:43 GMT, Boys..* wrote:
>>>
>>>>
>>>> http://time.com/2802038/india-rap...
>>>>
>>>> Yet again global outrage and attention are focused on India. In the
>>>> most recent rape-murder in Uttar Pradesh, a story of "boys will be
>>>> boys" unfolded in a chilling and familiar pattern. Two teenage girls
>>>> belonging to the Dalit caste went out to the fields because there are
>>>> not enough toilet facilities for women in India. They never returned.
>>>>
>>>> (For one thing, according to India's National Crime Records Bureau, three
>>>> to five rapes of women and girls, mostly Dalit, occur daily in Uttar
>>>> Pradesh alone.) We need to pay attention to-and do something about-what
>>>> happens in between, and what lies beneath.
>>>>
>>>> And what is that? In the context of past rapes, Mulayam Singh Yadav,
>>>> head of Uttar Pradesh's governing party, the Samajwadi Party, has said,
>>>> "Boys will be boys. They make mistakes." His statement, made in opposition
>>>> to the new law calling for the death penalty for gang rapes, highlights the
>>>> underlying social norms that contribute to most forms of violence against
>>>> women and girls, in India and around the world.
>>>
>>> Lacking proper "Jews" and "niggers" to look down on, ancient
>>> India subdivided it's own population and thus invented some
>>> in the form of the 'lower castes'. As this was the norm for
>>> thousands of years, with all Indian culture developing around
>>> it, steeped in it, do not expect things to change quickly there.
>>>
>>> Western egalitarian ideals are comparatively new concepts
>>> and will take a LONG time to penetrate Indian culture enough
>>> to make significant differences ... assuming they EVER
>>> penetrate Indian culture enough to make significant differences.
>>> If western culture suffers another bad economic implosion or
>>> two ... it, and its ideals, may simply fade away.
>>>
>>
>> Sigh...
>>
>> Back to ghee and cow-worship...
>
>
> Eh ... good as anything else I suppose .............
>
Healthy and happy cows!