[jboss-jira] [JBoss JIRA] (JGRP-1663) TimeScheduler3 could spawn too many threads

Bela Ban (JIRA) jira-events at lists.jboss.org
Sat Jul 20 05:57:26 EDT 2013


    [ https://issues.jboss.org/browse/JGRP-1663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12791169#comment-12791169 ] 

Bela Ban commented on JGRP-1663:
--------------------------------

That's definitely not the way TCPPING shuld be used ! I suggest use a different discovery protocol, e.g. TCPGOSSIP or - if multicasting is enabled - MPING.
I also suggest to set TCP.sock_conn_timeout to 200 ms (default:2s), so that TCP connection attempts to down hosts are not filling up the timer thread pool.
TCPPING does its discovery in parallel, so each of the discovery requests causes 50+ timer tasks to be added to the timer.
There's something else going on though as this should not accumulate 19'000 threads. The stack trace you pasted above shows threads waiting for the lock on connection establishment, do you see which thread actually acquired the lock and whether it is blocked itself ?
Also: STABLE.desired_avg_gossip="10": that's causing a STABLE multicast from *every* member every 10ms ! That's not the default and this causes *a lot of traffic*, possibly causing connection establishment to block.
                
> TimeScheduler3 could spawn too many threads
> -------------------------------------------
>
>                 Key: JGRP-1663
>                 URL: https://issues.jboss.org/browse/JGRP-1663
>             Project: JGroups
>          Issue Type: Bug
>    Affects Versions: 3.3.3
>            Reporter: Igor Mazur
>            Assignee: Bela Ban
>            Priority: Optional
>             Fix For: 3.4
>
>         Attachments: global.xml, site.xml
>
>
> With default timer thread pool settings this code could spawn thousands of threads:
> protected void submitToPool(final Task entry) {
>         try {
>             pool.execute(entry);
>         }
>         catch(RejectedExecutionException rejected) { // only thrown if rejection policy is "abort"
>             Thread thread=timer_thread_factory != null?
>               timer_thread_factory.newThread(entry, "Timer temp thread")
>               : new Thread(entry, "Timer temp thread");
>             thread.start();
>         }
>     }
> On my environment I got 19000 threads.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list