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 (Created) (JIRA)" <ji...@apache.org> on 2011/12/16 15:10:31 UTC

[jira] [Created] (CAMEL-4786) Add a sized scheduled thread pool to support throttler eip and other scheduled tasks, to avoid intaking more tasks than they can execute

Add a sized scheduled thread pool to support throttler eip and other scheduled tasks, to avoid intaking more tasks than they can execute
----------------------------------------------------------------------------------------------------------------------------------------

                 Key: CAMEL-4786
                 URL: https://issues.apache.org/jira/browse/CAMEL-4786
             Project: Camel
          Issue Type: Improvement
          Components: camel-core
    Affects Versions: 2.9.0
            Reporter: Claus Ibsen
            Assignee: Claus Ibsen
             Fix For: 2.9.1


The ScheduledThreadPoolExecutor from the JDK has a flaw that it has an unbounded queue task, which mean you can keep scheduling tasks to it, and it will never reject the tasks.
This could potential cause to eat up all memory if you add more tasks, than the thread pool can execute.

We need to guard the thread pool, and reject tasks if a queue size has been reached.

The default queue size in Camel is 1000, so the guard should use that option.


http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/ScheduledThreadPoolExecutor.html


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4786) Add a sized scheduled thread pool to support throttler eip and other scheduled tasks, to avoid intaking more tasks than they can execute

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

Claus Ibsen commented on CAMEL-4786:
------------------------------------

The irony is that the throttler is to guard against overloading another system. But the throttler itself could be overloaded :).
This only applies if asyncDelayed=true was enabled on the throttler. 
                
> Add a sized scheduled thread pool to support throttler eip and other scheduled tasks, to avoid intaking more tasks than they can execute
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4786
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4786
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.9.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.9.0
>
>
> The ScheduledThreadPoolExecutor from the JDK has a flaw that it has an unbounded queue task, which mean you can keep scheduling tasks to it, and it will never reject the tasks.
> This could potential cause to eat up all memory if you add more tasks, than the thread pool can execute.
> We need to guard the thread pool, and reject tasks if a queue size has been reached.
> The default queue size in Camel is 1000, so the guard should use that option.
> http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/ScheduledThreadPoolExecutor.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4786) Add a sized scheduled thread pool to support throttler eip and other scheduled tasks, to avoid intaking more tasks than they can execute

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

Claus Ibsen updated CAMEL-4786:
-------------------------------

    Fix Version/s:     (was: 2.9.1)
                   2.9.0
    
> Add a sized scheduled thread pool to support throttler eip and other scheduled tasks, to avoid intaking more tasks than they can execute
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4786
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4786
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.9.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.9.0
>
>
> The ScheduledThreadPoolExecutor from the JDK has a flaw that it has an unbounded queue task, which mean you can keep scheduling tasks to it, and it will never reject the tasks.
> This could potential cause to eat up all memory if you add more tasks, than the thread pool can execute.
> We need to guard the thread pool, and reject tasks if a queue size has been reached.
> The default queue size in Camel is 1000, so the guard should use that option.
> http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/ScheduledThreadPoolExecutor.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4786) Add a sized scheduled thread pool to support throttler eip and other scheduled tasks, to avoid intaking more tasks than they can execute

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

Claus Ibsen updated CAMEL-4786:
-------------------------------

    Affects Version/s: 2.8.3
        Fix Version/s: 2.8.4

We should backport a fix to the 2.8 branch as well.
                
> Add a sized scheduled thread pool to support throttler eip and other scheduled tasks, to avoid intaking more tasks than they can execute
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4786
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4786
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.8.3, 2.9.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.8.4, 2.9.0
>
>
> The ScheduledThreadPoolExecutor from the JDK has a flaw that it has an unbounded queue task, which mean you can keep scheduling tasks to it, and it will never reject the tasks.
> This could potential cause to eat up all memory if you add more tasks, than the thread pool can execute.
> We need to guard the thread pool, and reject tasks if a queue size has been reached.
> The default queue size in Camel is 1000, so the guard should use that option.
> http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/ScheduledThreadPoolExecutor.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CAMEL-4786) Add a sized scheduled thread pool to support throttler eip and other scheduled tasks, to avoid intaking more tasks than they can execute

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

Claus Ibsen resolved CAMEL-4786.
--------------------------------

    Resolution: Fixed
    
> Add a sized scheduled thread pool to support throttler eip and other scheduled tasks, to avoid intaking more tasks than they can execute
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4786
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4786
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.9.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.9.1
>
>
> The ScheduledThreadPoolExecutor from the JDK has a flaw that it has an unbounded queue task, which mean you can keep scheduling tasks to it, and it will never reject the tasks.
> This could potential cause to eat up all memory if you add more tasks, than the thread pool can execute.
> We need to guard the thread pool, and reject tasks if a queue size has been reached.
> The default queue size in Camel is 1000, so the guard should use that option.
> http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/ScheduledThreadPoolExecutor.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira