Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-20480

camel-platform-http-vertx - Execute using thread pool to not block event loop

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • None
    • 4.x
    • None
    • Unknown

    Description

      When using camel jbang debug then you can be slow during bebugging and cause the vertx thread to WARN log

      2024-02-28 12:42:26.814  WARN 27518 --- [-thread-checker] ertx.core.impl.BlockedThreadChecker : Thread Thread[vert.x-worker-thread-4,5,main] has been blocked for 264930 ms, time limit is 60000 ms
      io.vertx.core.VertxException: Thread blocked
      	at java.base/jdk.internal.misc.Unsafe.park(Native Method) ~[?:?]
      	at java.base/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:252) ~[?:?]
      	at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:717) ~[?:?]
      	at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1074) ~[?:?]
      	at java.base/java.util.concurrent.CountDownLatch.await(CountDownLatch.java:276) ~[?:?]
      	at org.apache.camel.impl.debugger.DefaultBacklogDebugger$NodeBreakpoint.beforeProcess(DefaultBacklogDebugger.java:910) ~[camel-base-engine-4.5.0-SNAPSHOT.jar:4.5.0-SNAPSHOT]
      	at org.apache.camel.impl.debugger.DefaultDebugger.onBeforeProcess(DefaultDebugger.java:290) ~[camel-base-engine-4.5.0-SNAPSHOT.jar:4.5.0-SNAPSHOT]
      	at org.apache.camel.impl.debugger.DefaultDebugger.beforeProcess(DefaultDebugger.java:232) ~[camel-base-engine-4.5.0-SNAPSHOT.jar:4.5.0-SNAPSHOT]
      	at org.apache.camel.impl.debugger.DefaultBacklogDebugger.beforeProcess(DefaultBacklogDebugger.java:776) ~[camel-base-engine-4.5.0-SNAPSHOT.jar:4.5.0-SNAPSHOT]
      	at org.apache.camel.impl.engine.CamelInternalProcessor$BacklogDebuggerAdvice.before(CamelInternalProcessor.java:769) ~[camel-base-engine-4.5.0-SNAPSHOT.jar:4.5.0-SNAPSHOT]
      	at org.apache.camel.impl.engine.CamelInternalProcessor$BacklogDebuggerAdvice.before(CamelInternalProcessor.java:755) ~[camel-base-engine-4.5.0-SNAPSHOT.jar:4.5.0-SNAPSHOT]
      	at org.apache.camel.impl.engine.CamelInternalProcessor.process(CamelInternalProcessor.java:317) ~[camel-base-engine-4.5.0-SNAPSHOT.jar:4.5.0-SNAPSHOT]
      	at org.apache.camel.processor.Pipeline$PipelineTask.run(Pipeline.java:102) ~[camel-core-processor-4.5.0-SNAPSHOT.jar:4.5.0-SNAPSHOT]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.doRun(DefaultReactiveExecutor.java:199) ~[camel-base-engine-4.5.0-SNAPSHOT.jar:4.5.0-SNAPSHOT]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.executeReactiveWork(DefaultReactiveExecutor.java:189) ~[camel-base-engine-4.5.0-SNAPSHOT.jar:4.5.0-SNAPSHOT]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.tryExecuteReactiveWork(DefaultReactiveExecutor.java:166) ~[camel-base-engine-4.5.0-SNAPSHOT.jar:4.5.0-SNAPSHOT]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148) ~[camel-base-engine-4.5.0-SNAPSHOT.jar:4.5.0-SNAPSHOT]
      	at org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:59) ~[camel-base-engine-4.5.0-SNAPSHOT.jar:4.5.0-SNAPSHOT]
      	at org.apache.camel.processor.Pipeline.process(Pipeline.java:163) ~[camel-core-processor-4.5.0-SNAPSHOT.jar:4.5.0-SNAPSHOT]
      	at org.apache.camel.impl.engine.CamelInternalProcessor.processNonTransacted(CamelInternalProcessor.java:354) ~[camel-base-engine-4.5.0-SNAPSHOT.jar:4.5.0-SNAPSHOT]
      	at org.apache.camel.impl.engine.CamelInternalProcessor.process(CamelInternalProcessor.java:330) ~[camel-base-engine-4.5.0-SNAPSHOT.jar:4.5.0-SNAPSHOT]
      	at org.apache.camel.impl.engine.DefaultAsyncProcessorAwaitManager.process(DefaultAsyncProcessorAwaitManager.java:82) ~[camel-base-engine-4.5.0-SNAPSHOT.jar:4.5.0-SNAPSHOT]
      	at org.apache.camel.support.AsyncProcessorSupport.process(AsyncProcessorSupport.java:32) ~[camel-support-4.5.0-SNAPSHOT.jar:4.5.0-SNAPSHOT]
      	at org.apache.camel.component.platform.http.vertx.VertxPlatformHttpConsumer.processExchange(VertxPlatformHttpConsumer.java:236) ~[camel-platform-http-vertx-4.5.0-SNAPSHOT.jar:4.5.0-SNAPSHOT]
      	at org.apache.camel.component.platform.http.vertx.VertxPlatformHttpConsumer.lambda$handleRequest$1(VertxPlatformHttpConsumer.java:204) ~[camel-platform-http-vertx-4.5.0-SNAPSHOT.jar:4.5.0-SNAPSHOT]
      	at org.apache.camel.component.platform.http.vertx.VertxPlatformHttpConsumer$$Lambda$514/0x00000008014aa340.call(Unknown Source) ~[?:?]
      	at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$0(ContextImpl.java:177) ~[vertx-core-4.5.2.jar:4.5.2]
      	at io.vertx.core.impl.ContextImpl$$Lambda$515/0x00000008014aa570.handle(Unknown Source) ~[?:?]
      	at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:276) ~[vertx-core-4.5.2.jar:4.5.2]
      	at io.vertx.core.impl.ContextImpl.lambda$internalExecuteBlocking$2(ContextImpl.java:209) ~[vertx-core-4.5.2.jar:4.5.2]
      	at io.vertx.core.impl.ContextImpl$$Lambda$516/0x00000008014aa9a8.run(Unknown Source) ~[?:?]
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
      	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.106.Final.jar:4.1.106.Final]
      	at java.base/java.lang.Thread.run(Thread.java:833) ~[?:?]
      

      We may consider having vertx executed in a blocking thread pool to avoid this noise. And make it an option users can choose to enable also.

      Attachments

        Activity

          People

            Unassigned Unassigned
            davsclaus Claus Ibsen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: