Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MULTIPLE PATCH CSV FILE CancellationException #2642

Open
ebett-bayer opened this issue Nov 5, 2024 · 4 comments
Open

MULTIPLE PATCH CSV FILE CancellationException #2642

ebett-bayer opened this issue Nov 5, 2024 · 4 comments

Comments

@ebett-bayer
Copy link

We are running 40jobs in parallel reading the message from azure queue, compute then using a Feign client to PATCH a CSV file with 700 lines each.
After 30 min, we start to see Http connection cancelations in the pool. No http patch message is sent in those threads (at least they don't appear in logs:
Dependencies:
implementation 'org.springframework.cloud:spring-cloud-starter-openfeign:4.1.3'
implementation 'io.github.openfeign:feign-hc5:12.4'

at com.azure.messaging.servicebus.MessagePump.notifyMessage(MessagePump.java:157)
at com.azure.messaging.servicebus.MessagePump.lambda$handleMessage$3(MessagePump.java:142)
at com.azure.messaging.servicebus.implementation.instrumentation.ServiceBusReceiverInstrumentation.wrap(ServiceBusReceiverInstrumentation.java:169)
at com.azure.messaging.servicebus.implementation.instrumentation.ServiceBusReceiverInstrumentation.instrumentProcess(ServiceBusReceiverInstrumentation.java:104)
at com.azure.messaging.servicebus.MessagePump.handleMessage(MessagePump.java:135)
at com.azure.messaging.servicebus.MessagePump$RunOnWorker.lambda$apply$0(MessagePump.java:212)
at reactor.core.publisher.MonoRunnable.call(MonoRunnable.java:73)
at reactor.core.publisher.MonoRunnable.call(MonoRunnable.java:32)
at reactor.core.publisher.FluxSubscribeOnCallable$CallableSubscribeOnSubscription.run(FluxSubscribeOnCallable.java:228)
at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.util.concurrent.CancellationException: null
at org.apache.hc.core5.concurrent.BasicFuture.getResult(BasicFuture.java:75)
at org.apache.hc.core5.concurrent.BasicFuture.get(BasicFuture.java:96)
at org.apache.hc.core5.pool.StrictConnPool$1.get(StrictConnPool.java:184)
at org.apache.hc.core5.pool.StrictConnPool$1.get(StrictConnPool.java:178)

at org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager$3.get(PoolingHttpClientConnectionManager.java:311)
at org.apache.hc.client5.http.impl.classic.InternalExecRuntime.acquireEndpoint(InternalExecRuntime.java:109)
at org.apache.hc.client5.http.impl.classic.ConnectExec.execute(ConnectExec.java:125)
at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
at org.apache.hc.client5.http.impl.classic.ProtocolExec.execute(ProtocolExec.java:192)
at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
at org.apache.hc.client5.http.impl.classic.HttpRequestRetryExec.execute(HttpRequestRetryExec.java:113)
at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
at org.apache.hc.client5.http.impl.classic.ContentCompressionExec.execute(ContentCompressionExec.java:152)
at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
at org.apache.hc.client5.http.impl.classic.RedirectExec.execute(RedirectExec.java:116)
at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
at org.apache.hc.client5.http.impl.classic.InternalHttpClient.doExecute(InternalHttpClient.java:170)
at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:87)
at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:55)
at feign.hc5.ApacheHttp5Client.execute(ApacheHttp5Client.java:88)

What could be the reason?

@gromspys
Copy link
Contributor

gromspys commented Nov 5, 2024

As I see you use reactor in your project. Try to use feign-reactive if it's possible.

@ebett-bayer
Copy link
Author

ebett-bayer commented Nov 5, 2024

Reactor comes with the lib for Azure Service Bus consumption. I will see if I could exclue that dependency and try feign-reactive instead.
Thanks, I will comment here after I can test it.

@ebett-bayer
Copy link
Author

ebett-bayer commented Nov 5, 2024

@gromspys could you tell me if this is all the changes needed?

implementation ('com.azure:azure-messaging-servicebus:7.17.0') {
exclude group: 'io.projectreactor', module: 'reactor-core'
}
implementation 'com.playtika.reactivefeign:feign-reactor-core:4.2.1'

@gromspys
Copy link
Contributor

gromspys commented Nov 6, 2024

Not sure if this will work. Since feign client is part of another library, there may be some client, connection pool, or thread pool configuration gaps. Try creating an issue in azure-messaging-servicebus and provide a minimal reproducible example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants