You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rpc-dev@xml.apache.org by Daniel Rall <dl...@finemaltcoding.com> on 2002/08/20 18:51:57 UTC
Re: Web server thread counting
"Rob Walker" <ro...@softsell.com> writes:
> We have a scenario where the following line in WebServer.java throws
> spurious errors:
>
>
> if (runners.activeCount () > 255)
> {
> throw new RuntimeException ("System overload");
> }
>
>
> The problem with this occurs if any of the the xml/rpc service handlers create
> threads themselves, then as it's parent, these will also end up in the
> "runners" ThreadGroup unless the parent of the created thread is specifically
> set differently.
>
> Hence the above doesn't just count runner threads, but also all threads
> which runner threads create. We can easily work around this in our code, by
> setting the ThreadGroup before creating new threads - but the behaviour
> seems wrong somehow.
Rob, I agree that the behavior you describe seems wrong. I'm not
currently very knowledgeable about thread groups; would you mind
writing up patch (in unidiff format) to rectify the situation?
--
Daniel Rall <dl...@finemaltcoding.com>