You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2012/09/04 15:37:07 UTC

[jira] [Created] (CAMEL-5563) ExecutorServiceManager - Should shutdown thread pools less aggressively

Claus Ibsen created CAMEL-5563:
----------------------------------

             Summary: ExecutorServiceManager - Should shutdown thread pools less aggressively 
                 Key: CAMEL-5563
                 URL: https://issues.apache.org/jira/browse/CAMEL-5563
             Project: Camel
          Issue Type: Improvement
          Components: camel-core
    Affects Versions: 2.10.0
            Reporter: Claus Ibsen
            Assignee: Claus Ibsen
             Fix For: 2.11.0, 2.10.2


We have so far favored shutting down thread pools a bit too aggressively from the start using shutdownNow. Instead we should favor shutdown, and allow the pool a bit time to shutdown orderly, before we go aggressively by shutting down now.

We should also allow end users to configure a await termination timeout value to control how long we wait to orderly shutdown.

By default this value could be 5 seconds (not too high and not to low).

Also we should consider allow to configure a log level, which logs the in-flight threads which wasn't shutdown orderly. This can aid people to identify these threads.

By default we could log this at WARN level. Notice that over time these threads may shutdown naturally when they complete, so its not a severe error. 

This requires minder API additions to ExeuctorServiceManager. However it ought to be worthy of being backported to the 2.10 branch IMHO

--
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

[jira] [Commented] (CAMEL-5563) ExecutorServiceManager - Should shutdown thread pools less aggressively

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13447702#comment-13447702 ] 

Claus Ibsen commented on CAMEL-5563:
------------------------------------

Gathering the in-flight threads is harder, so we will leave that out. All we can get is the not yet run tasks, which is not so important.
                
> ExecutorServiceManager - Should shutdown thread pools less aggressively 
> ------------------------------------------------------------------------
>
>                 Key: CAMEL-5563
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5563
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.10.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.11.0, 2.10.2
>
>
> We have so far favored shutting down thread pools a bit too aggressively from the start using shutdownNow. Instead we should favor shutdown, and allow the pool a bit time to shutdown orderly, before we go aggressively by shutting down now.
> We should also allow end users to configure a await termination timeout value to control how long we wait to orderly shutdown.
> By default this value could be 5 seconds (not too high and not to low).
> Also we should consider allow to configure a log level, which logs the in-flight threads which wasn't shutdown orderly. This can aid people to identify these threads.
> By default we could log this at WARN level. Notice that over time these threads may shutdown naturally when they complete, so its not a severe error. 
> This requires minder API additions to ExeuctorServiceManager. However it ought to be worthy of being backported to the 2.10 branch IMHO

--
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

[jira] [Commented] (CAMEL-5563) ExecutorServiceManager - Should shutdown thread pools less aggressively

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13450443#comment-13450443 ] 

Claus Ibsen commented on CAMEL-5563:
------------------------------------

Instead of graceful by default, we have decided to add a shutdownGraceful method instead. This gives end user to full power to chose what to use.

API documented in the bottom of this page
https://cwiki.apache.org/confluence/display/CAMEL/Threading+Model

This also avoids a slight API change in the 2.10 branch, which will be reverted.
                
> ExecutorServiceManager - Should shutdown thread pools less aggressively 
> ------------------------------------------------------------------------
>
>                 Key: CAMEL-5563
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5563
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.10.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.11.0, 2.10.2
>
>
> We have so far favored shutting down thread pools a bit too aggressively from the start using shutdownNow. Instead we should favor shutdown, and allow the pool a bit time to shutdown orderly, before we go aggressively by shutting down now.
> We should also allow end users to configure a await termination timeout value to control how long we wait to orderly shutdown.
> By default this value could be 5 seconds (not too high and not to low).
> Also we should consider allow to configure a log level, which logs the in-flight threads which wasn't shutdown orderly. This can aid people to identify these threads.
> By default we could log this at WARN level. Notice that over time these threads may shutdown naturally when they complete, so its not a severe error. 
> This requires minder API additions to ExeuctorServiceManager. However it ought to be worthy of being backported to the 2.10 branch IMHO

--
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

[jira] [Resolved] (CAMEL-5563) ExecutorServiceManager - Should shutdown thread pools less aggressively

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5563?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-5563.
--------------------------------

    Resolution: Fixed
    
> ExecutorServiceManager - Should shutdown thread pools less aggressively 
> ------------------------------------------------------------------------
>
>                 Key: CAMEL-5563
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5563
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.10.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.11.0, 2.10.2
>
>
> We have so far favored shutting down thread pools a bit too aggressively from the start using shutdownNow. Instead we should favor shutdown, and allow the pool a bit time to shutdown orderly, before we go aggressively by shutting down now.
> We should also allow end users to configure a await termination timeout value to control how long we wait to orderly shutdown.
> By default this value could be 5 seconds (not too high and not to low).
> Also we should consider allow to configure a log level, which logs the in-flight threads which wasn't shutdown orderly. This can aid people to identify these threads.
> By default we could log this at WARN level. Notice that over time these threads may shutdown naturally when they complete, so its not a severe error. 
> This requires minder API additions to ExeuctorServiceManager. However it ought to be worthy of being backported to the 2.10 branch IMHO

--
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

[jira] [Commented] (CAMEL-5563) ExecutorServiceManager - Should shutdown thread pools less aggressively

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13448576#comment-13448576 ] 

Claus Ibsen commented on CAMEL-5563:
------------------------------------

We use a 30 second timeout which allows more time to shutdown graceful, and then again when we shutdown aggressively.

Notice that Camel already shutdown really nice, so this is more aided as fallback, but also in case end users use their own thread pools, and do not shutdown them properly in their custom components etc.
                
> ExecutorServiceManager - Should shutdown thread pools less aggressively 
> ------------------------------------------------------------------------
>
>                 Key: CAMEL-5563
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5563
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.10.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.11.0, 2.10.2
>
>
> We have so far favored shutting down thread pools a bit too aggressively from the start using shutdownNow. Instead we should favor shutdown, and allow the pool a bit time to shutdown orderly, before we go aggressively by shutting down now.
> We should also allow end users to configure a await termination timeout value to control how long we wait to orderly shutdown.
> By default this value could be 5 seconds (not too high and not to low).
> Also we should consider allow to configure a log level, which logs the in-flight threads which wasn't shutdown orderly. This can aid people to identify these threads.
> By default we could log this at WARN level. Notice that over time these threads may shutdown naturally when they complete, so its not a severe error. 
> This requires minder API additions to ExeuctorServiceManager. However it ought to be worthy of being backported to the 2.10 branch IMHO

--
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

[jira] [Reopened] (CAMEL-5563) ExecutorServiceManager - Should shutdown thread pools less aggressively

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5563?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reopened CAMEL-5563:
--------------------------------

    
> ExecutorServiceManager - Should shutdown thread pools less aggressively 
> ------------------------------------------------------------------------
>
>                 Key: CAMEL-5563
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5563
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.10.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.11.0, 2.10.2
>
>
> We have so far favored shutting down thread pools a bit too aggressively from the start using shutdownNow. Instead we should favor shutdown, and allow the pool a bit time to shutdown orderly, before we go aggressively by shutting down now.
> We should also allow end users to configure a await termination timeout value to control how long we wait to orderly shutdown.
> By default this value could be 5 seconds (not too high and not to low).
> Also we should consider allow to configure a log level, which logs the in-flight threads which wasn't shutdown orderly. This can aid people to identify these threads.
> By default we could log this at WARN level. Notice that over time these threads may shutdown naturally when they complete, so its not a severe error. 
> This requires minder API additions to ExeuctorServiceManager. However it ought to be worthy of being backported to the 2.10 branch IMHO

--
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

[jira] [Resolved] (CAMEL-5563) ExecutorServiceManager - Should shutdown thread pools less aggressively

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5563?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-5563.
--------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 2.10.2)

We favor regular shutdown when stopping in doStop. And more aggressive when shutting down in doShutdown.

                
> ExecutorServiceManager - Should shutdown thread pools less aggressively 
> ------------------------------------------------------------------------
>
>                 Key: CAMEL-5563
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5563
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.10.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.11.0
>
>
> We have so far favored shutting down thread pools a bit too aggressively from the start using shutdownNow. Instead we should favor shutdown, and allow the pool a bit time to shutdown orderly, before we go aggressively by shutting down now.
> We should also allow end users to configure a await termination timeout value to control how long we wait to orderly shutdown.
> By default this value could be 5 seconds (not too high and not to low).
> Also we should consider allow to configure a log level, which logs the in-flight threads which wasn't shutdown orderly. This can aid people to identify these threads.
> By default we could log this at WARN level. Notice that over time these threads may shutdown naturally when they complete, so its not a severe error. 
> This requires minder API additions to ExeuctorServiceManager. However it ought to be worthy of being backported to the 2.10 branch IMHO

--
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