You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Chris Watts (JIRA)" <ji...@apache.org> on 2012/10/31 01:44:12 UTC
[jira] [Created] (CAMEL-5762) StackOverflowError when repeatedly
stopping/starting route
Chris Watts created CAMEL-5762:
----------------------------------
Summary: StackOverflowError when repeatedly stopping/starting route
Key: CAMEL-5762
URL: https://issues.apache.org/jira/browse/CAMEL-5762
Project: Camel
Issue Type: Bug
Components: camel-core
Affects Versions: 2.10.2
Reporter: Chris Watts
Essentially when repeatedly stopping and starting a route (consuming from JMS queue) it eventually starts throwing StackOverflowError.
{code:java}
while (true) {
camelContext.stopRoute("route", 1500, TimeUnit.MILLISECONDS);
Thread.sleep(1000);
camelContext.startRoute("route", 1500, TimeUnit.MILLISECONDS);
Thread.sleep(1000);
}{code}
Log is:
{noformat}2012-10-30 07:00:34,701 INFO Thread1 MyTestThread - stopRoute mainInRoute
2012-10-30 07:00:34,701 INFO Thread1 org.apache.camel.impl.DefaultShutdownStrategy - Starting to graceful shutdown 1 routes (timeout 1500 milliseconds)
2012-10-30 07:00:34,808 WARN Camel (camel) thread #4 - ShutdownTask org.apache.camel.impl.DefaultShutdownStrategy - Error occurred while shutting down route: Consumer[activemq://queue:test.queue?maxConcurrentConsumers=1]. This exception will be ignored.
java.lang.StackOverflowError
at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:104)
at org.apache.camel.processor.UnmarshalProcessor.doStop(UnmarshalProcessor.java:105)
at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:91)
at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.stop(AsyncProcessorConverterHelper.java:96)
at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
at org.apache.camel.processor.DelegateAsyncProcessor.doStop(DelegateAsyncProcessor.java:82)
at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:91)
at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
at org.apache.camel.processor.DelegateAsyncProcessor.doStop(DelegateAsyncProcessor.java:82)
at org.apache.camel.processor.interceptor.TraceInterceptor.doStop(TraceInterceptor.java:364)
at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:91)
at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
......
at org.apache.camel.processor.DelegateAsyncProcessor.doStop(DelegateAsyncProcessor.java:82)
at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:91)
at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
at org.apache.camel.processor.DelegateAsyncProcessor.doStop(DelegateAsyncProcessor.java:82)
at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:91)
at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
2012-10-30 07:00:34,867 INFO Camel (camel) thread #4 - ShutdownTask org.apache.camel.impl.DefaultShutdownStrategy - Route: mainInRoute shutdown complete, was consuming from: Endpoint[activemq://queue:test.queue?maxConcurrentConsumers=1]
2012-10-30 07:00:34,868 INFO Thread1 org.apache.camel.impl.DefaultShutdownStrategy - Graceful shutdown of 1 routes completed in 0 seconds
2012-10-30 07:00:34,872 INFO Thread1 org.apache.camel.spring.SpringCamelContext - Route: mainInRoute stopped, was consuming from: Endpoint[activemq://queue:test.queue?maxConcurrentConsumers=1]{noformat}
--
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-5762) StackOverflowError when repeatedly
stopping/starting route
Posted by "Christian Müller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-5762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13489074#comment-13489074 ]
Christian Müller commented on CAMEL-5762:
-----------------------------------------
But we shouldn't see a StackOverflowError, although Chris use stop/start instead of suspend/resume...
> StackOverflowError when repeatedly stopping/starting route
> ----------------------------------------------------------
>
> Key: CAMEL-5762
> URL: https://issues.apache.org/jira/browse/CAMEL-5762
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.10.2
> Reporter: Chris Watts
> Assignee: Claus Ibsen
> Fix For: 2.11.0
>
>
> Essentially when repeatedly stopping and starting a route (consuming from JMS queue) it eventually starts throwing StackOverflowError.
> {code:java}
> while (true) {
> camelContext.stopRoute("route", 1500, TimeUnit.MILLISECONDS);
> Thread.sleep(1000);
> camelContext.startRoute("route", 1500, TimeUnit.MILLISECONDS);
> Thread.sleep(1000);
> }{code}
> Log is:
> {noformat}2012-10-30 07:00:34,701 INFO Thread1 MyTestThread - stopRoute mainInRoute
> 2012-10-30 07:00:34,701 INFO Thread1 org.apache.camel.impl.DefaultShutdownStrategy - Starting to graceful shutdown 1 routes (timeout 1500 milliseconds)
> 2012-10-30 07:00:34,808 WARN Camel (camel) thread #4 - ShutdownTask org.apache.camel.impl.DefaultShutdownStrategy - Error occurred while shutting down route: Consumer[activemq://queue:test.queue?maxConcurrentConsumers=1]. This exception will be ignored.
> java.lang.StackOverflowError
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:104)
> at org.apache.camel.processor.UnmarshalProcessor.doStop(UnmarshalProcessor.java:105)
> at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:91)
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
> at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.stop(AsyncProcessorConverterHelper.java:96)
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
> at org.apache.camel.processor.DelegateAsyncProcessor.doStop(DelegateAsyncProcessor.java:82)
> at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:91)
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
> at org.apache.camel.processor.DelegateAsyncProcessor.doStop(DelegateAsyncProcessor.java:82)
> at org.apache.camel.processor.interceptor.TraceInterceptor.doStop(TraceInterceptor.java:364)
> at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:91)
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
> ......
> at org.apache.camel.processor.DelegateAsyncProcessor.doStop(DelegateAsyncProcessor.java:82)
> at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:91)
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
> at org.apache.camel.processor.DelegateAsyncProcessor.doStop(DelegateAsyncProcessor.java:82)
> at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:91)
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
> 2012-10-30 07:00:34,867 INFO Camel (camel) thread #4 - ShutdownTask org.apache.camel.impl.DefaultShutdownStrategy - Route: mainInRoute shutdown complete, was consuming from: Endpoint[activemq://queue:test.queue?maxConcurrentConsumers=1]
> 2012-10-30 07:00:34,868 INFO Thread1 org.apache.camel.impl.DefaultShutdownStrategy - Graceful shutdown of 1 routes completed in 0 seconds
> 2012-10-30 07:00:34,872 INFO Thread1 org.apache.camel.spring.SpringCamelContext - Route: mainInRoute stopped, was consuming from: Endpoint[activemq://queue:test.queue?maxConcurrentConsumers=1]{noformat}
--
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-5762) StackOverflowError when repeatedly
stopping/starting route
Posted by "Chris Watts (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-5762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13488343#comment-13488343 ]
Chris Watts commented on CAMEL-5762:
------------------------------------
Just read the first comment - Ok I'll try using suspend resume. Thanks
Claus.
> StackOverflowError when repeatedly stopping/starting route
> ----------------------------------------------------------
>
> Key: CAMEL-5762
> URL: https://issues.apache.org/jira/browse/CAMEL-5762
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.10.2
> Reporter: Chris Watts
> Assignee: Claus Ibsen
> Fix For: 2.11.0
>
>
> Essentially when repeatedly stopping and starting a route (consuming from JMS queue) it eventually starts throwing StackOverflowError.
> {code:java}
> while (true) {
> camelContext.stopRoute("route", 1500, TimeUnit.MILLISECONDS);
> Thread.sleep(1000);
> camelContext.startRoute("route", 1500, TimeUnit.MILLISECONDS);
> Thread.sleep(1000);
> }{code}
> Log is:
> {noformat}2012-10-30 07:00:34,701 INFO Thread1 MyTestThread - stopRoute mainInRoute
> 2012-10-30 07:00:34,701 INFO Thread1 org.apache.camel.impl.DefaultShutdownStrategy - Starting to graceful shutdown 1 routes (timeout 1500 milliseconds)
> 2012-10-30 07:00:34,808 WARN Camel (camel) thread #4 - ShutdownTask org.apache.camel.impl.DefaultShutdownStrategy - Error occurred while shutting down route: Consumer[activemq://queue:test.queue?maxConcurrentConsumers=1]. This exception will be ignored.
> java.lang.StackOverflowError
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:104)
> at org.apache.camel.processor.UnmarshalProcessor.doStop(UnmarshalProcessor.java:105)
> at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:91)
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
> at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.stop(AsyncProcessorConverterHelper.java:96)
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
> at org.apache.camel.processor.DelegateAsyncProcessor.doStop(DelegateAsyncProcessor.java:82)
> at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:91)
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
> at org.apache.camel.processor.DelegateAsyncProcessor.doStop(DelegateAsyncProcessor.java:82)
> at org.apache.camel.processor.interceptor.TraceInterceptor.doStop(TraceInterceptor.java:364)
> at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:91)
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
> ......
> at org.apache.camel.processor.DelegateAsyncProcessor.doStop(DelegateAsyncProcessor.java:82)
> at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:91)
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
> at org.apache.camel.processor.DelegateAsyncProcessor.doStop(DelegateAsyncProcessor.java:82)
> at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:91)
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
> 2012-10-30 07:00:34,867 INFO Camel (camel) thread #4 - ShutdownTask org.apache.camel.impl.DefaultShutdownStrategy - Route: mainInRoute shutdown complete, was consuming from: Endpoint[activemq://queue:test.queue?maxConcurrentConsumers=1]
> 2012-10-30 07:00:34,868 INFO Thread1 org.apache.camel.impl.DefaultShutdownStrategy - Graceful shutdown of 1 routes completed in 0 seconds
> 2012-10-30 07:00:34,872 INFO Thread1 org.apache.camel.spring.SpringCamelContext - Route: mainInRoute stopped, was consuming from: Endpoint[activemq://queue:test.queue?maxConcurrentConsumers=1]{noformat}
--
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-5762) StackOverflowError when repeatedly
stopping/starting route
Posted by "Chris Watts (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-5762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13488339#comment-13488339 ]
Chris Watts commented on CAMEL-5762:
------------------------------------
I should have said - in production we were using a 10 second delay.
After a period of close to 2 hours we got the stackoverflow.
I had made it one second to try and replicate it quicker.
I will see if I can replicate it with a longer sleep period.
> StackOverflowError when repeatedly stopping/starting route
> ----------------------------------------------------------
>
> Key: CAMEL-5762
> URL: https://issues.apache.org/jira/browse/CAMEL-5762
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.10.2
> Reporter: Chris Watts
> Assignee: Claus Ibsen
> Fix For: 2.11.0
>
>
> Essentially when repeatedly stopping and starting a route (consuming from JMS queue) it eventually starts throwing StackOverflowError.
> {code:java}
> while (true) {
> camelContext.stopRoute("route", 1500, TimeUnit.MILLISECONDS);
> Thread.sleep(1000);
> camelContext.startRoute("route", 1500, TimeUnit.MILLISECONDS);
> Thread.sleep(1000);
> }{code}
> Log is:
> {noformat}2012-10-30 07:00:34,701 INFO Thread1 MyTestThread - stopRoute mainInRoute
> 2012-10-30 07:00:34,701 INFO Thread1 org.apache.camel.impl.DefaultShutdownStrategy - Starting to graceful shutdown 1 routes (timeout 1500 milliseconds)
> 2012-10-30 07:00:34,808 WARN Camel (camel) thread #4 - ShutdownTask org.apache.camel.impl.DefaultShutdownStrategy - Error occurred while shutting down route: Consumer[activemq://queue:test.queue?maxConcurrentConsumers=1]. This exception will be ignored.
> java.lang.StackOverflowError
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:104)
> at org.apache.camel.processor.UnmarshalProcessor.doStop(UnmarshalProcessor.java:105)
> at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:91)
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
> at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.stop(AsyncProcessorConverterHelper.java:96)
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
> at org.apache.camel.processor.DelegateAsyncProcessor.doStop(DelegateAsyncProcessor.java:82)
> at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:91)
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
> at org.apache.camel.processor.DelegateAsyncProcessor.doStop(DelegateAsyncProcessor.java:82)
> at org.apache.camel.processor.interceptor.TraceInterceptor.doStop(TraceInterceptor.java:364)
> at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:91)
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
> ......
> at org.apache.camel.processor.DelegateAsyncProcessor.doStop(DelegateAsyncProcessor.java:82)
> at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:91)
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
> at org.apache.camel.processor.DelegateAsyncProcessor.doStop(DelegateAsyncProcessor.java:82)
> at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:91)
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
> 2012-10-30 07:00:34,867 INFO Camel (camel) thread #4 - ShutdownTask org.apache.camel.impl.DefaultShutdownStrategy - Route: mainInRoute shutdown complete, was consuming from: Endpoint[activemq://queue:test.queue?maxConcurrentConsumers=1]
> 2012-10-30 07:00:34,868 INFO Thread1 org.apache.camel.impl.DefaultShutdownStrategy - Graceful shutdown of 1 routes completed in 0 seconds
> 2012-10-30 07:00:34,872 INFO Thread1 org.apache.camel.spring.SpringCamelContext - Route: mainInRoute stopped, was consuming from: Endpoint[activemq://queue:test.queue?maxConcurrentConsumers=1]{noformat}
--
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-5762) StackOverflowError when repeatedly
stopping/starting route
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-5762?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-5762.
--------------------------------
Resolution: Invalid
Fix Version/s: 2.11.0
Assignee: Claus Ibsen
And you use timeout (eg 1.5 sec), which wont give time for the routes to properly stop cleanly. That is your problem.
> StackOverflowError when repeatedly stopping/starting route
> ----------------------------------------------------------
>
> Key: CAMEL-5762
> URL: https://issues.apache.org/jira/browse/CAMEL-5762
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.10.2
> Reporter: Chris Watts
> Assignee: Claus Ibsen
> Fix For: 2.11.0
>
>
> Essentially when repeatedly stopping and starting a route (consuming from JMS queue) it eventually starts throwing StackOverflowError.
> {code:java}
> while (true) {
> camelContext.stopRoute("route", 1500, TimeUnit.MILLISECONDS);
> Thread.sleep(1000);
> camelContext.startRoute("route", 1500, TimeUnit.MILLISECONDS);
> Thread.sleep(1000);
> }{code}
> Log is:
> {noformat}2012-10-30 07:00:34,701 INFO Thread1 MyTestThread - stopRoute mainInRoute
> 2012-10-30 07:00:34,701 INFO Thread1 org.apache.camel.impl.DefaultShutdownStrategy - Starting to graceful shutdown 1 routes (timeout 1500 milliseconds)
> 2012-10-30 07:00:34,808 WARN Camel (camel) thread #4 - ShutdownTask org.apache.camel.impl.DefaultShutdownStrategy - Error occurred while shutting down route: Consumer[activemq://queue:test.queue?maxConcurrentConsumers=1]. This exception will be ignored.
> java.lang.StackOverflowError
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:104)
> at org.apache.camel.processor.UnmarshalProcessor.doStop(UnmarshalProcessor.java:105)
> at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:91)
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
> at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.stop(AsyncProcessorConverterHelper.java:96)
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
> at org.apache.camel.processor.DelegateAsyncProcessor.doStop(DelegateAsyncProcessor.java:82)
> at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:91)
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
> at org.apache.camel.processor.DelegateAsyncProcessor.doStop(DelegateAsyncProcessor.java:82)
> at org.apache.camel.processor.interceptor.TraceInterceptor.doStop(TraceInterceptor.java:364)
> at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:91)
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
> ......
> at org.apache.camel.processor.DelegateAsyncProcessor.doStop(DelegateAsyncProcessor.java:82)
> at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:91)
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
> at org.apache.camel.processor.DelegateAsyncProcessor.doStop(DelegateAsyncProcessor.java:82)
> at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:91)
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
> 2012-10-30 07:00:34,867 INFO Camel (camel) thread #4 - ShutdownTask org.apache.camel.impl.DefaultShutdownStrategy - Route: mainInRoute shutdown complete, was consuming from: Endpoint[activemq://queue:test.queue?maxConcurrentConsumers=1]
> 2012-10-30 07:00:34,868 INFO Thread1 org.apache.camel.impl.DefaultShutdownStrategy - Graceful shutdown of 1 routes completed in 0 seconds
> 2012-10-30 07:00:34,872 INFO Thread1 org.apache.camel.spring.SpringCamelContext - Route: mainInRoute stopped, was consuming from: Endpoint[activemq://queue:test.queue?maxConcurrentConsumers=1]{noformat}
--
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-5762) StackOverflowError when repeatedly
stopping/starting route
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-5762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13487648#comment-13487648 ]
Claus Ibsen commented on CAMEL-5762:
------------------------------------
You should use suspend/resume when you do it so frequently. Especially with resources like JMS.
> StackOverflowError when repeatedly stopping/starting route
> ----------------------------------------------------------
>
> Key: CAMEL-5762
> URL: https://issues.apache.org/jira/browse/CAMEL-5762
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.10.2
> Reporter: Chris Watts
>
> Essentially when repeatedly stopping and starting a route (consuming from JMS queue) it eventually starts throwing StackOverflowError.
> {code:java}
> while (true) {
> camelContext.stopRoute("route", 1500, TimeUnit.MILLISECONDS);
> Thread.sleep(1000);
> camelContext.startRoute("route", 1500, TimeUnit.MILLISECONDS);
> Thread.sleep(1000);
> }{code}
> Log is:
> {noformat}2012-10-30 07:00:34,701 INFO Thread1 MyTestThread - stopRoute mainInRoute
> 2012-10-30 07:00:34,701 INFO Thread1 org.apache.camel.impl.DefaultShutdownStrategy - Starting to graceful shutdown 1 routes (timeout 1500 milliseconds)
> 2012-10-30 07:00:34,808 WARN Camel (camel) thread #4 - ShutdownTask org.apache.camel.impl.DefaultShutdownStrategy - Error occurred while shutting down route: Consumer[activemq://queue:test.queue?maxConcurrentConsumers=1]. This exception will be ignored.
> java.lang.StackOverflowError
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:104)
> at org.apache.camel.processor.UnmarshalProcessor.doStop(UnmarshalProcessor.java:105)
> at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:91)
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
> at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.stop(AsyncProcessorConverterHelper.java:96)
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
> at org.apache.camel.processor.DelegateAsyncProcessor.doStop(DelegateAsyncProcessor.java:82)
> at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:91)
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
> at org.apache.camel.processor.DelegateAsyncProcessor.doStop(DelegateAsyncProcessor.java:82)
> at org.apache.camel.processor.interceptor.TraceInterceptor.doStop(TraceInterceptor.java:364)
> at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:91)
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
> ......
> at org.apache.camel.processor.DelegateAsyncProcessor.doStop(DelegateAsyncProcessor.java:82)
> at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:91)
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
> at org.apache.camel.processor.DelegateAsyncProcessor.doStop(DelegateAsyncProcessor.java:82)
> at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:91)
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
> at org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
> 2012-10-30 07:00:34,867 INFO Camel (camel) thread #4 - ShutdownTask org.apache.camel.impl.DefaultShutdownStrategy - Route: mainInRoute shutdown complete, was consuming from: Endpoint[activemq://queue:test.queue?maxConcurrentConsumers=1]
> 2012-10-30 07:00:34,868 INFO Thread1 org.apache.camel.impl.DefaultShutdownStrategy - Graceful shutdown of 1 routes completed in 0 seconds
> 2012-10-30 07:00:34,872 INFO Thread1 org.apache.camel.spring.SpringCamelContext - Route: mainInRoute stopped, was consuming from: Endpoint[activemq://queue:test.queue?maxConcurrentConsumers=1]{noformat}
--
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