You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by apara <ap...@standardset.com> on 2015/05/02 22:49:28 UTC

CamelContext.shutdown takes a long time(), almost a second per route

I have a CamelContext with 12 routes and it takes about 11 seconds (or close
to 1 second per route) to execute a graceful shutdown.

INFO [main] org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:247] Graceful shutdown of 12 routes completed
in 11 seconds

Since I am building pipelines dynamically, I expect to have closer to 300 to
400 routes.  At that rate, the shutdown will take over 5 minutes.

My test just creates the context and tears it down.  There are no events
being sent through any of the routes.  During the shutdown process the CPU
load is quite high.

Nothing is timing out, there are no exceptions or WARN/ERROR messages during
the shutdown process, here is the detailed debug output.

I tried changing the startupOrder decreasing from 500, or increasing from
Integer.MIN_VALUE, but there was not a significant change (although
decreasing from 500 reduced the shutdown by 1 second).

I would like to have a graceful shutdown, but I need it to run faster. 

Any ideas as to what I am doing wrong?

Here is the full debug output:

13:43:24,209 kinesis-consumer INFO [main]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:184] Starting to graceful shutdown 12 routes
(timeout 300 seconds)
2015-05-02 13:43:24,209 kinesis-consumer DEBUG [main]
org.apache.camel.impl.DefaultExecutorServiceManager
[DefaultExecutorServiceManager.java:193] Created new ThreadPool for source:
org.apache.camel.impl.DefaultShutdownStrategy@3a78b343 with name:
ShutdownTask. ->
org.apache.camel.util.concurrent.RejectableThreadPoolExecutor@528f3f1d[Running,
pool size = 0, active threads = 0, queued tasks = 0, completed tasks =
0][ShutdownTask]
2015-05-02 13:43:24,211 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:516] There are 12 routes to shutdown
2015-05-02 13:43:24,212 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:568] Route:
vm://duplicateEventChecker?size=10&blockWhenFull=true ->
bean://duplicateEventChecker? suspension deferred.
2015-05-02 13:43:24,213 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:568] Route:
PIPELINE_direct://sync.handle.event? suspension deferred.
2015-05-02 13:43:24,213 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:568] Route:
vm://mongoDBPersistence_0?size=10&blockWhenFull=true ->
bean://mongoDBPersistence? suspension deferred.
2015-05-02 13:43:24,213 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:568] Route:
vm://bufferedEventToPreviousLoadStartAssociation_0?size=10&blockWhenFull=true
-> bean://bufferedEventToPreviousLoadStartAssociation? suspension deferred.
2015-05-02 13:43:24,213 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:568] Route:
vm://insertPlaySuccessAfterTimeupdate_0?size=10&blockWhenFull=true ->
bean://insertPlaySuccessAfterTimeupdate? suspension deferred.
2015-05-02 13:43:24,214 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:568] Route:
vm://loadStartToPreviousLoadStartAssociation_0?size=10&blockWhenFull=true ->
bean://loadStartToPreviousLoadStartAssociation? suspension deferred.
2015-05-02 13:43:24,214 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:568] Route:
vm://playerStartUpEventAugmentation_0?size=10&blockWhenFull=true ->
bean://playerStartUpEventAugmentation? suspension deferred.
2015-05-02 13:43:24,214 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:568] Route:
vm://bufferedEventInsertAugmentation_0?size=10&blockWhenFull=true ->
bean://bufferedEventInsertAugmentation? suspension deferred.
2015-05-02 13:43:24,215 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:568] Route:
vm://pageToIdEventAssociation_0?size=10&blockWhenFull=true ->
bean://pageToIdEventAssociation? suspension deferred.
2015-05-02 13:43:24,215 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:568] Route:
vm://duplicateEventChecker_0?size=10&blockWhenFull=true ->
bean://duplicateEventChecker? suspension deferred.
2015-05-02 13:43:24,215 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:568] Route:
PIPELINE_vm://pipeline_0?size=10&blockWhenFull=true suspension deferred.
2015-05-02 13:43:24,216 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:568] Route: direct://async.handle.event?
suspension deferred.
2015-05-02 13:43:24,216 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.component.seda.SedaConsumer [SedaConsumer.java:118]
Preparing to shutdown, waiting for 1 consumer threads to complete.
2015-05-02 13:43:26,191 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #9 -
vm://duplicateEventChecker] org.apache.camel.component.seda.SedaConsumer
[SedaConsumer.java:233] Ending this polling consumer thread, there are still
0 consumer threads left.
2015-05-02 13:43:26,191 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:635] Route:
vm://duplicateEventChecker?size=10&blockWhenFull=true ->
bean://duplicateEventChecker? preparing to shutdown complete.
2015-05-02 13:43:26,193 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:635] Route:
PIPELINE_direct://sync.handle.event? preparing to shutdown complete.
2015-05-02 13:43:26,193 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.component.seda.SedaConsumer [SedaConsumer.java:118]
Preparing to shutdown, waiting for 1 consumer threads to complete.
2015-05-02 13:43:27,188 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #8 -
vm://mongoDBPersistence_0] org.apache.camel.component.seda.SedaConsumer
[SedaConsumer.java:233] Ending this polling consumer thread, there are still
0 consumer threads left.
2015-05-02 13:43:27,188 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:635] Route:
vm://mongoDBPersistence_0?size=10&blockWhenFull=true ->
bean://mongoDBPersistence? preparing to shutdown complete.
2015-05-02 13:43:27,189 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.component.seda.SedaConsumer [SedaConsumer.java:118]
Preparing to shutdown, waiting for 1 consumer threads to complete.
2015-05-02 13:43:28,191 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #7 -
vm://bufferedEventToPreviousLoadStartAssociation_0]
org.apache.camel.component.seda.SedaConsumer [SedaConsumer.java:233] Ending
this polling consumer thread, there are still 0 consumer threads left.
2015-05-02 13:43:28,191 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:635] Route:
vm://bufferedEventToPreviousLoadStartAssociation_0?size=10&blockWhenFull=true
-> bean://bufferedEventToPreviousLoadStartAssociation? preparing to shutdown
complete.
2015-05-02 13:43:28,192 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.component.seda.SedaConsumer [SedaConsumer.java:118]
Preparing to shutdown, waiting for 1 consumer threads to complete.
2015-05-02 13:43:28,874 kinesis-consumer INFO
[metrics-logger-reporter-1-thread-1]
com.mediaplatform.cdc.consumer.simple.METRICS [Slf4jReporter.java:324]
type=METER, name=recordsProcessMeter, count=0, mean_rate=0.0, m1=0.0,
m5=0.0, m15=0.0, rate_unit=events/second
2015-05-02 13:43:28,876 kinesis-consumer INFO
[metrics-logger-reporter-1-thread-1]
com.mediaplatform.cdc.consumer.simple.METRICS [Slf4jReporter.java:324]
type=TIMER, name=recordsProcessTimer, count=0, min=0.0, max=0.0, mean=0.0,
stddev=0.0, median=0.0, p75=0.0, p95=0.0, p98=0.0, p99=0.0, p999=0.0,
mean_rate=0.0, m1=0.0, m5=0.0, m15=0.0, rate_unit=events/second,
duration_unit=milliseconds
2015-05-02 13:43:29,189 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #6 -
vm://insertPlaySuccessAfterTimeupdate_0]
org.apache.camel.component.seda.SedaConsumer [SedaConsumer.java:233] Ending
this polling consumer thread, there are still 0 consumer threads left.
2015-05-02 13:43:29,189 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:635] Route:
vm://insertPlaySuccessAfterTimeupdate_0?size=10&blockWhenFull=true ->
bean://insertPlaySuccessAfterTimeupdate? preparing to shutdown complete.
2015-05-02 13:43:29,191 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.component.seda.SedaConsumer [SedaConsumer.java:118]
Preparing to shutdown, waiting for 1 consumer threads to complete.
2015-05-02 13:43:30,193 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:635] Route:
vm://loadStartToPreviousLoadStartAssociation_0?size=10&blockWhenFull=true ->
bean://loadStartToPreviousLoadStartAssociation? preparing to shutdown
complete.
2015-05-02 13:43:30,193 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #5 -
vm://loadStartToPreviousLoadStartAssociation_0]
org.apache.camel.component.seda.SedaConsumer [SedaConsumer.java:233] Ending
this polling consumer thread, there are still 0 consumer threads left.
2015-05-02 13:43:30,194 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.component.seda.SedaConsumer [SedaConsumer.java:118]
Preparing to shutdown, waiting for 1 consumer threads to complete.
2015-05-02 13:43:31,197 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #4 -
vm://playerStartUpEventAugmentation_0]
org.apache.camel.component.seda.SedaConsumer [SedaConsumer.java:233] Ending
this polling consumer thread, there are still 0 consumer threads left.
2015-05-02 13:43:31,197 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:635] Route:
vm://playerStartUpEventAugmentation_0?size=10&blockWhenFull=true ->
bean://playerStartUpEventAugmentation? preparing to shutdown complete.
2015-05-02 13:43:31,199 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.component.seda.SedaConsumer [SedaConsumer.java:118]
Preparing to shutdown, waiting for 1 consumer threads to complete.
2015-05-02 13:43:32,188 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #3 -
vm://bufferedEventInsertAugmentation_0]
org.apache.camel.component.seda.SedaConsumer [SedaConsumer.java:233] Ending
this polling consumer thread, there are still 0 consumer threads left.
2015-05-02 13:43:32,188 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:635] Route:
vm://bufferedEventInsertAugmentation_0?size=10&blockWhenFull=true ->
bean://bufferedEventInsertAugmentation? preparing to shutdown complete.
2015-05-02 13:43:32,190 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.component.seda.SedaConsumer [SedaConsumer.java:118]
Preparing to shutdown, waiting for 1 consumer threads to complete.
2015-05-02 13:43:33,189 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:635] Route:
vm://pageToIdEventAssociation_0?size=10&blockWhenFull=true ->
bean://pageToIdEventAssociation? preparing to shutdown complete.
2015-05-02 13:43:33,189 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #2 -
vm://pageToIdEventAssociation_0]
org.apache.camel.component.seda.SedaConsumer [SedaConsumer.java:233] Ending
this polling consumer thread, there are still 0 consumer threads left.
2015-05-02 13:43:33,190 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.component.seda.SedaConsumer [SedaConsumer.java:118]
Preparing to shutdown, waiting for 1 consumer threads to complete.
2015-05-02 13:43:33,875 kinesis-consumer INFO
[metrics-logger-reporter-1-thread-1]
com.mediaplatform.cdc.consumer.simple.METRICS [Slf4jReporter.java:324]
type=METER, name=recordsProcessMeter, count=0, mean_rate=0.0, m1=0.0,
m5=0.0, m15=0.0, rate_unit=events/second
2015-05-02 13:43:33,876 kinesis-consumer INFO
[metrics-logger-reporter-1-thread-1]
com.mediaplatform.cdc.consumer.simple.METRICS [Slf4jReporter.java:324]
type=TIMER, name=recordsProcessTimer, count=0, min=0.0, max=0.0, mean=0.0,
stddev=0.0, median=0.0, p75=0.0, p95=0.0, p98=0.0, p99=0.0, p999=0.0,
mean_rate=0.0, m1=0.0, m5=0.0, m15=0.0, rate_unit=events/second,
duration_unit=milliseconds
2015-05-02 13:43:34,191 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:635] Route:
vm://duplicateEventChecker_0?size=10&blockWhenFull=true ->
bean://duplicateEventChecker? preparing to shutdown complete.
2015-05-02 13:43:34,191 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #1 -
vm://duplicateEventChecker_0] org.apache.camel.component.seda.SedaConsumer
[SedaConsumer.java:233] Ending this polling consumer thread, there are still
0 consumer threads left.
2015-05-02 13:43:34,192 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.component.seda.SedaConsumer [SedaConsumer.java:118]
Preparing to shutdown, waiting for 1 consumer threads to complete.
2015-05-02 13:43:35,193 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:635] Route:
PIPELINE_vm://pipeline_0?size=10&blockWhenFull=true preparing to shutdown
complete.
2015-05-02 13:43:35,193 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #0 - vm://pipeline_0]
org.apache.camel.component.seda.SedaConsumer [SedaConsumer.java:233] Ending
this polling consumer thread, there are still 0 consumer threads left.
2015-05-02 13:43:35,194 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:635] Route: direct://async.handle.event?
preparing to shutdown complete.
2015-05-02 13:43:35,195 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultExecutorServiceManager
[DefaultExecutorServiceManager.java:365] Forcing shutdown of
ExecutorService:
org.apache.camel.util.concurrent.RejectableThreadPoolExecutor@1e8b4880[Running,
pool size = 1, active threads = 0, queued tasks = 0, completed tasks =
1][vm://duplicateEventChecker?blockWhenFull=true&size=10]
2015-05-02 13:43:35,196 kinesis-consumer INFO [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:647] Route:
vm://duplicateEventChecker?size=10&blockWhenFull=true ->
bean://duplicateEventChecker? shutdown complete, was consuming from:
Endpoint[vm://duplicateEventChecker?blockWhenFull=true&size=10]
2015-05-02 13:43:35,197 kinesis-consumer INFO [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:647] Route:
PIPELINE_direct://sync.handle.event? shutdown complete, was consuming from:
Endpoint[direct://sync.handle.event]
2015-05-02 13:43:35,198 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultExecutorServiceManager
[DefaultExecutorServiceManager.java:365] Forcing shutdown of
ExecutorService:
org.apache.camel.util.concurrent.RejectableThreadPoolExecutor@23037aeb[Running,
pool size = 1, active threads = 0, queued tasks = 0, completed tasks =
1][vm://mongoDBPersistence_0?blockWhenFull=true&size=10]
2015-05-02 13:43:35,198 kinesis-consumer INFO [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:647] Route:
vm://mongoDBPersistence_0?size=10&blockWhenFull=true ->
bean://mongoDBPersistence? shutdown complete, was consuming from:
Endpoint[vm://mongoDBPersistence_0?blockWhenFull=true&size=10]
2015-05-02 13:43:35,199 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultExecutorServiceManager
[DefaultExecutorServiceManager.java:365] Forcing shutdown of
ExecutorService:
org.apache.camel.util.concurrent.RejectableThreadPoolExecutor@42f0627a[Running,
pool size = 1, active threads = 0, queued tasks = 0, completed tasks =
1][vm://bufferedEventToPreviousLoadStartAssociation_0?blockWhenFull=true&size=10]
2015-05-02 13:43:35,199 kinesis-consumer INFO [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:647] Route:
vm://bufferedEventToPreviousLoadStartAssociation_0?size=10&blockWhenFull=true
-> bean://bufferedEventToPreviousLoadStartAssociation? shutdown complete,
was consuming from:
Endpoint[vm://bufferedEventToPreviousLoadStartAssociation_0?blockWhenFull=true&size=10]
2015-05-02 13:43:35,200 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultExecutorServiceManager
[DefaultExecutorServiceManager.java:365] Forcing shutdown of
ExecutorService:
org.apache.camel.util.concurrent.RejectableThreadPoolExecutor@68781cb5[Running,
pool size = 1, active threads = 0, queued tasks = 0, completed tasks =
1][vm://insertPlaySuccessAfterTimeupdate_0?blockWhenFull=true&size=10]
2015-05-02 13:43:35,201 kinesis-consumer INFO [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:647] Route:
vm://insertPlaySuccessAfterTimeupdate_0?size=10&blockWhenFull=true ->
bean://insertPlaySuccessAfterTimeupdate? shutdown complete, was consuming
from:
Endpoint[vm://insertPlaySuccessAfterTimeupdate_0?blockWhenFull=true&size=10]
2015-05-02 13:43:35,201 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultExecutorServiceManager
[DefaultExecutorServiceManager.java:365] Forcing shutdown of
ExecutorService:
org.apache.camel.util.concurrent.RejectableThreadPoolExecutor@7f7c5d58[Running,
pool size = 1, active threads = 0, queued tasks = 0, completed tasks =
1][vm://loadStartToPreviousLoadStartAssociation_0?blockWhenFull=true&size=10]
2015-05-02 13:43:35,202 kinesis-consumer INFO [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:647] Route:
vm://loadStartToPreviousLoadStartAssociation_0?size=10&blockWhenFull=true ->
bean://loadStartToPreviousLoadStartAssociation? shutdown complete, was
consuming from:
Endpoint[vm://loadStartToPreviousLoadStartAssociation_0?blockWhenFull=true&size=10]
2015-05-02 13:43:35,203 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultExecutorServiceManager
[DefaultExecutorServiceManager.java:365] Forcing shutdown of
ExecutorService:
org.apache.camel.util.concurrent.RejectableThreadPoolExecutor@57e00dd[Running,
pool size = 1, active threads = 0, queued tasks = 0, completed tasks =
1][vm://playerStartUpEventAugmentation_0?blockWhenFull=true&size=10]
2015-05-02 13:43:35,203 kinesis-consumer INFO [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:647] Route:
vm://playerStartUpEventAugmentation_0?size=10&blockWhenFull=true ->
bean://playerStartUpEventAugmentation? shutdown complete, was consuming
from:
Endpoint[vm://playerStartUpEventAugmentation_0?blockWhenFull=true&size=10]
2015-05-02 13:43:35,204 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultExecutorServiceManager
[DefaultExecutorServiceManager.java:365] Forcing shutdown of
ExecutorService:
org.apache.camel.util.concurrent.RejectableThreadPoolExecutor@4e404fad[Running,
pool size = 1, active threads = 0, queued tasks = 0, completed tasks =
1][vm://bufferedEventInsertAugmentation_0?blockWhenFull=true&size=10]
2015-05-02 13:43:35,204 kinesis-consumer INFO [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:647] Route:
vm://bufferedEventInsertAugmentation_0?size=10&blockWhenFull=true ->
bean://bufferedEventInsertAugmentation? shutdown complete, was consuming
from:
Endpoint[vm://bufferedEventInsertAugmentation_0?blockWhenFull=true&size=10]
2015-05-02 13:43:35,205 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultExecutorServiceManager
[DefaultExecutorServiceManager.java:365] Forcing shutdown of
ExecutorService:
org.apache.camel.util.concurrent.RejectableThreadPoolExecutor@4ee195bf[Running,
pool size = 1, active threads = 0, queued tasks = 0, completed tasks =
1][vm://pageToIdEventAssociation_0?blockWhenFull=true&size=10]
2015-05-02 13:43:35,205 kinesis-consumer INFO [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:647] Route:
vm://pageToIdEventAssociation_0?size=10&blockWhenFull=true ->
bean://pageToIdEventAssociation? shutdown complete, was consuming from:
Endpoint[vm://pageToIdEventAssociation_0?blockWhenFull=true&size=10]
2015-05-02 13:43:35,206 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultExecutorServiceManager
[DefaultExecutorServiceManager.java:365] Forcing shutdown of
ExecutorService:
org.apache.camel.util.concurrent.RejectableThreadPoolExecutor@1d08f5ed[Running,
pool size = 1, active threads = 0, queued tasks = 0, completed tasks =
1][vm://duplicateEventChecker_0?blockWhenFull=true&size=10]
2015-05-02 13:43:35,206 kinesis-consumer INFO [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:647] Route:
vm://duplicateEventChecker_0?size=10&blockWhenFull=true ->
bean://duplicateEventChecker? shutdown complete, was consuming from:
Endpoint[vm://duplicateEventChecker_0?blockWhenFull=true&size=10]
2015-05-02 13:43:35,207 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultExecutorServiceManager
[DefaultExecutorServiceManager.java:365] Forcing shutdown of
ExecutorService:
org.apache.camel.util.concurrent.RejectableThreadPoolExecutor@4e699ec3[Running,
pool size = 1, active threads = 0, queued tasks = 0, completed tasks =
1][vm://pipeline_0?blockWhenFull=true&size=10]
2015-05-02 13:43:35,207 kinesis-consumer INFO [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:647] Route:
PIPELINE_vm://pipeline_0?size=10&blockWhenFull=true shutdown complete, was
consuming from: Endpoint[vm://pipeline_0?blockWhenFull=true&size=10]
2015-05-02 13:43:35,208 kinesis-consumer INFO [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:647] Route: direct://async.handle.event?
shutdown complete, was consuming from: Endpoint[direct://async.handle.event]
2015-05-02 13:43:35,208 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.component.seda.SedaConsumer [SedaConsumer.java:118]
Preparing to shutdown, waiting for 0 consumer threads to complete.
2015-05-02 13:43:35,209 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.component.seda.SedaConsumer [SedaConsumer.java:118]
Preparing to shutdown, waiting for 0 consumer threads to complete.
2015-05-02 13:43:35,209 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.component.seda.SedaConsumer [SedaConsumer.java:118]
Preparing to shutdown, waiting for 0 consumer threads to complete.
2015-05-02 13:43:35,209 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.component.seda.SedaConsumer [SedaConsumer.java:118]
Preparing to shutdown, waiting for 0 consumer threads to complete.
2015-05-02 13:43:35,209 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.component.seda.SedaConsumer [SedaConsumer.java:118]
Preparing to shutdown, waiting for 0 consumer threads to complete.
2015-05-02 13:43:35,210 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.component.seda.SedaConsumer [SedaConsumer.java:118]
Preparing to shutdown, waiting for 0 consumer threads to complete.
2015-05-02 13:43:35,210 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.component.seda.SedaConsumer [SedaConsumer.java:118]
Preparing to shutdown, waiting for 0 consumer threads to complete.
2015-05-02 13:43:35,210 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.component.seda.SedaConsumer [SedaConsumer.java:118]
Preparing to shutdown, waiting for 0 consumer threads to complete.
2015-05-02 13:43:35,210 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.component.seda.SedaConsumer [SedaConsumer.java:118]
Preparing to shutdown, waiting for 0 consumer threads to complete.
2015-05-02 13:43:35,211 kinesis-consumer DEBUG [Camel
(handler-b7cd7848-9cc8-11e4-89d3-123b93f75cba) thread #10 - ShutdownTask]
org.apache.camel.component.seda.SedaConsumer [SedaConsumer.java:118]
Preparing to shutdown, waiting for 0 consumer threads to complete.
2015-05-02 13:43:35,211 kinesis-consumer INFO [main]
org.apache.camel.impl.DefaultShutdownStrategy
[DefaultShutdownStrategy.java:247] Graceful shutdown of 12 routes completed
in 11 seconds



--
View this message in context: http://camel.465427.n5.nabble.com/CamelContext-shutdown-takes-a-long-time-almost-a-second-per-route-tp5766595.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: CamelContext.shutdown takes a long time(), almost a second per route

Posted by apara <ap...@standardset.com>.
As documented in the SEDA endpoint, the solution was to reduce pollTimeout
from 1 second down to a small number, but this results in more CPU being
consumed while the system is in the idle state waiting for work.  I may need
to play with the DefaultShutdownStrategy to possibly do an interrupt
first...



--
View this message in context: http://camel.465427.n5.nabble.com/CamelContext-shutdown-takes-a-long-time-almost-a-second-per-route-tp5766595p5766597.html
Sent from the Camel - Users mailing list archive at Nabble.com.