You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2020/09/29 13:39:03 UTC

[GitHub] [camel-k-runtime] makandre opened a new issue #513: Thread blocked calling knative REST

makandre opened a new issue #513:
URL: https://github.com/apache/camel-k-runtime/issues/513


   @makandre commented on [Tue Sep 29 2020](https://github.com/apache/camel-k/issues/1720)
   
   I'm doing a `.to("rest:...")` call, and because the target endpoint is a knative service, it takes some time for it to spin up. When that happens I get these thread blocked errors:
   
   ```
   Sep 29, 2020 1:23:41 PM io.vertx.core.impl.BlockedThreadChecker
   WARNING: Thread Thread[vert.x-eventloop-thread-0,5,main]=Thread[vert.x-eventloop-thread-0,5,main] has been blocked for 10006 ms, time limit is 2000 ms
   io.vertx.core.VertxException: Thread blocked
   ```
   
   I'm using camel-k `1.1.0`
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k-runtime] lburgazzoli commented on issue #513: Thread blocked calling knative REST

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #513:
URL: https://github.com/apache/camel-k-runtime/issues/513#issuecomment-709372453


   You only need:
   
       quarkus.vertx.max-event-loop-execute-time
   
   and you should need to add any additional dependency


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k-runtime] lburgazzoli commented on issue #513: Thread blocked calling knative REST

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #513:
URL: https://github.com/apache/camel-k-runtime/issues/513#issuecomment-701294544


   @makandre mind posting the complete route definition ?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k-runtime] lburgazzoli commented on issue #513: Thread blocked calling knative REST

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #513:
URL: https://github.com/apache/camel-k-runtime/issues/513#issuecomment-709313044


   yes, you now need to extends a route builder in any case


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k-runtime] lburgazzoli commented on issue #513: Thread blocked calling knative REST

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #513:
URL: https://github.com/apache/camel-k-runtime/issues/513#issuecomment-701456006


   I'm working on a fix but may take a while to get incorporated in camel-k.
   In the meantime you can register a bean to the registry to configure the Vert.x instance, like:
   
   
   ```java
   @org.apache.camel.BindToRegistry
   public io.vertx.core.VertxOptions vertxOptions() {
       return new io.vertx.core.VertxOptions()
           .setMaxEventLoopExecuteTime(10)
           .setMaxEventLoopExecuteTimeUnit(TimeUnit.SECONDS));
   }
   ```
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k-runtime] makandre commented on issue #513: Thread blocked calling knative REST

Posted by GitBox <gi...@apache.org>.
makandre commented on issue #513:
URL: https://github.com/apache/camel-k-runtime/issues/513#issuecomment-701341244


   How do I check that?  I didn't configure specifically for quarkus, so I assume I'm using default.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k-runtime] lburgazzoli commented on issue #513: Thread blocked calling knative REST

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #513:
URL: https://github.com/apache/camel-k-runtime/issues/513#issuecomment-709340808


   @makandre you can try setting `quarkus.vertx.max-event-loop-execute-time` (Duration)
   see https://quarkus.io/guides/all-config#quarkus-vertx-core_quarkus.vertx.max-event-loop-execute-time


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k-runtime] lburgazzoli commented on issue #513: Thread blocked calling knative REST

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #513:
URL: https://github.com/apache/camel-k-runtime/issues/513#issuecomment-709332479


   ah yeah sorry, we have switched to quarkus as default, let me see how it can be fixed in that case


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k-runtime] lburgazzoli closed issue #513: Thread blocked calling knative REST

Posted by GitBox <gi...@apache.org>.
lburgazzoli closed issue #513:
URL: https://github.com/apache/camel-k-runtime/issues/513


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k-runtime] makandre commented on issue #513: Thread blocked calling knative REST

Posted by GitBox <gi...@apache.org>.
makandre commented on issue #513:
URL: https://github.com/apache/camel-k-runtime/issues/513#issuecomment-709267983


   Hi @lburgazzoli, I just updated to camel-k 1.2, and the above workaround you gave me stopped working; my change of the timeout doesn't take affect and it's always uses the default 2000ms


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k-runtime] makandre commented on issue #513: Thread blocked calling knative REST

Posted by GitBox <gi...@apache.org>.
makandre commented on issue #513:
URL: https://github.com/apache/camel-k-runtime/issues/513#issuecomment-709382069


   Thank you, that worked.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k-runtime] pjcubero commented on issue #513: Thread blocked calling knative REST

Posted by GitBox <gi...@apache.org>.
pjcubero commented on issue #513:
URL: https://github.com/apache/camel-k-runtime/issues/513#issuecomment-712779235


   this way?
   
   	@org.apache.camel.BindToRegistry
   	public io.vertx.core.VertxOptions vertxOptions() {
   		return new io.vertx.core.VertxOptions()
   			.setMaxEventLoopExecuteTime(2000)
   			.setMaxEventLoopExecuteTimeUnit(TimeUnit.SECONDS));
   	}  
     
     @Override
     public void configure() throws Exception {


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k-runtime] makandre commented on issue #513: Thread blocked calling knative REST

Posted by GitBox <gi...@apache.org>.
makandre commented on issue #513:
URL: https://github.com/apache/camel-k-runtime/issues/513#issuecomment-709370058


   I might be setting this wrong I got:
   
   ```
   Error configuring property: camel.component.quarkus.vertx.max-event-loop-execute-time because cannot find component with name quarkus. Make sure you have the component on the classpath
   ```
   
   I added `camel-quarkus-vertx` as a dependency


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k-runtime] makandre commented on issue #513: Thread blocked calling knative REST

Posted by GitBox <gi...@apache.org>.
makandre commented on issue #513:
URL: https://github.com/apache/camel-k-runtime/issues/513#issuecomment-701328927


   Sure, my route is acting as a proxy to another knative service
   
   ```
   restConfiguration().setHost("a knative .svc.cluster.local host")
   
   rest("/results")
       .get("/{id}")
       .to("direct:results");
   
   from("direct:results")
       .removeHeaders("*", "CamelHttpPath")
       .to("rest:get:?bridgeEndpoint=true");
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k-runtime] lburgazzoli commented on issue #513: Thread blocked calling knative REST

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #513:
URL: https://github.com/apache/camel-k-runtime/issues/513#issuecomment-701341585


   ok, thx I think I know what the issue is now


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k-runtime] makandre commented on issue #513: Thread blocked calling knative REST

Posted by GitBox <gi...@apache.org>.
makandre commented on issue #513:
URL: https://github.com/apache/camel-k-runtime/issues/513#issuecomment-712775942


   Yes, I used the `vertxoption` method before camel-k 1.2 (when it wasn't using Quarkus).  I just defined the method as suggested above in the same `RouteBuilder` as my route definitions.  You don't need to call the method since it's using `@BindToRegistry`, Camel was able to figure it out.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k-runtime] pjcubero commented on issue #513: Thread blocked calling knative REST

Posted by GitBox <gi...@apache.org>.
pjcubero commented on issue #513:
URL: https://github.com/apache/camel-k-runtime/issues/513#issuecomment-712714152


   Dear @makandre, can you explain me how have done that? I have one integration that calls other knative channels, and I see the problem with the thread blocked lot of times, can you explain me how have you solved?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k-runtime] lburgazzoli commented on issue #513: Thread blocked calling knative REST

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #513:
URL: https://github.com/apache/camel-k-runtime/issues/513#issuecomment-701339874


   What runtime are you on ? the default one or quarkus ?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k-runtime] lburgazzoli commented on issue #513: Thread blocked calling knative REST

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #513:
URL: https://github.com/apache/camel-k-runtime/issues/513#issuecomment-725273019


   This should have been fixed upstream


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k-runtime] makandre commented on issue #513: Thread blocked calling knative REST

Posted by GitBox <gi...@apache.org>.
makandre commented on issue #513:
URL: https://github.com/apache/camel-k-runtime/issues/513#issuecomment-709325223


   I don't quite follow.  The class where I've placed that `vertxOptions` method does extend `RouteBuilder`


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k-runtime] makandre commented on issue #513: Thread blocked calling knative REST

Posted by GitBox <gi...@apache.org>.
makandre commented on issue #513:
URL: https://github.com/apache/camel-k-runtime/issues/513#issuecomment-712781736


   Right.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k-runtime] pjcubero edited a comment on issue #513: Thread blocked calling knative REST

Posted by GitBox <gi...@apache.org>.
pjcubero edited a comment on issue #513:
URL: https://github.com/apache/camel-k-runtime/issues/513#issuecomment-712714152


   Dear @makandre, can you explain me how have done that? I have one integration that calls other knative channels, and I see the problem with the thread blocked lot of times, can you explain me how have you solved? I have disable quarkus, I don't want to use... then, have you created one class, extended from the routebuilder, with this method? vertxoptions, and from your integration how do you invoke this operation?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org