You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Sean LeBlanc <se...@comcast.net> on 2007/04/13 16:57:28 UTC

Client-side thread model questions

Hello,

I'm testing out my client-side code by firing off many threads which in
turn, call a simulated server. I find that it works okay up until a certain
point. Any more than about 60 threads, and I get in trouble - not all
messages get sent, and the program never exits, either. 

However, in the documentation I've noticed that it's recommended to change
default thread model, and it then goes on to discuss an example for
server-side code. I'm wondering if this applies equally to the client side.
The server side is also implemented with mina, so I'm going to change that
as well and try out client again.

I'm puzzled, though as to why messages never complete and it never exits. I
would think it would just block somewhere and complete time would be longer,
but maybe my understanding is incorrect, and maybe the behavior I'm seeing
would be different with a non-default thread model.  I can supply my code
examples, if need be.


Cheers,

-- 
Sean LeBlanc:seanleblanc@comcast.net  
http://sean-leblanc.blogspot.com/
The problem with reality is the lack of background music. 

Re: Client-side thread model questions

Posted by Trustin Lee <tr...@gmail.com>.
Hi Sean,

On 4/13/07, Sean LeBlanc <se...@comcast.net> wrote:
> Hello,
>
> I'm testing out my client-side code by firing off many threads which in
> turn, call a simulated server. I find that it works okay up until a certain
> point. Any more than about 60 threads, and I get in trouble - not all
> messages get sent, and the program never exits, either.
>
> However, in the documentation I've noticed that it's recommended to change
> default thread model, and it then goes on to discuss an example for
> server-side code. I'm wondering if this applies equally to the client side.
> The server side is also implemented with mina, so I'm going to change that
> as well and try out client again.
>
> I'm puzzled, though as to why messages never complete and it never exits. I
> would think it would just block somewhere and complete time would be longer,
> but maybe my understanding is incorrect, and maybe the behavior I'm seeing
> would be different with a non-default thread model.  I can supply my code
> examples, if need be.

Your explanation doesn't give me a clue.   Why don't you post the full
thread dump, log file, or the test code that reproduces the problem?

http://mina.apache.org/reporting-a-bug.html

HTH,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6