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

MssqlConnectionClosedException: Connection unexpectedly closed #248

Open
menakaprabu opened this issue Jan 28, 2022 · 5 comments
Open

MssqlConnectionClosedException: Connection unexpectedly closed #248

menakaprabu opened this issue Jan 28, 2022 · 5 comments
Labels
status: waiting-for-feedback We need additional information before we can continue

Comments

@menakaprabu
Copy link

Hello,
I am getting the below exception happening in Production. It is random issue and once I get the issue, it is not inserting the data into the DB for particular time and after sometimes the record is getting inserted into DB. We are loosing few records in the DB because of this exception.
Please suggest asap. Let me know if you need more information.
org.springframework.dao.DataAccessResourceFailureException: Failed to obtain R2DBC Connection nested exception is io.r2dbc.mssql.client.ReactorNettyClient$MssqlConnectionClosedException: Connection unexpectedly closed


Caused by: io.r2dbc.mssql.client.ReactorNettyClient$MssqlConnectionClosedException: Connection unexpectedly closed
at io.r2dbc.mssql.client.ReactorNettyClient.handleClose(ReactorNettyClient.java:612) ~[r2dbc-mssql-0.8.6.RELEASE.jar!/:0.8.6.RELEASE]
at reactor.core.publisher.FluxHandle$HandleSubscriber.onError(FluxHandle.java:202) ~[reactor-core-3.4.7.jar!/:3.4.7]

@xarnthehero
Copy link

I am seeing the same issue. Have you found any workaround?
I don't know how DB connections and pools work well, but in my testing the select statements are going through and various delete statements are the only ones failing - no idea if this is relevant. This error is seen rarely and restarting our service will have it working again.

I wonder if there is a way to test for closed connections in the connection pool?

@mp911de
Copy link
Member

mp911de commented Apr 6, 2022

If you would like us to spend some time helping you to diagnose the problem, please spend some time describing it and, ideally, providing a minimal sample that reproduces the problem. Random issues are very difficult to investigate and we need sufficient details to be able to reproduce it.

@mp911de mp911de added the status: waiting-for-feedback We need additional information before we can continue label Apr 6, 2022
@stephanpelikan
Copy link

I see the same problem using 1.0.1.RELEASE. I use Microsoft SQL Server 16.00.4035 as well as Microsoft SQL Server 15.00.2101.

I happens not always, only in half of the requests with local SQL Server. In our test environment (Azure) it is more often.

I'm doing SELECTs only including 4-6 columns of strings and number, no blob. Unfortunately, this is a show stopper for us. For me it is reproducable but I cannot provide my code since this is closed source. How can I help to investigate this?

A colleque of mine who developed this code didn't see the problem on his local machine at all. Maybe this something about timeouts?

Thx,
Stephan

2023-06-23T08:52:06.421+02:00  WARN 11282 --- [or-http-epoll-3] i.r2dbc.mssql.client.ReactorNettyClient  : Connection has been closed by peer
2023-06-23T08:52:06.422+02:00 ERROR 11282 --- [or-http-epoll-3] reactor.core.publisher.Operators         : Operator called default onErrorDropped

io.r2dbc.mssql.client.ReactorNettyClient$MssqlConnectionClosedException: Connection unexpectedly closed
	at io.r2dbc.mssql.client.ReactorNettyClient.lambda$static$0(ReactorNettyClient.java:97) ~[r2dbc-mssql-1.0.1.RELEASE.jar:1.0.1.RELEASE]
	at io.r2dbc.mssql.client.ReactorNettyClient.drainError(ReactorNettyClient.java:702) ~[r2dbc-mssql-1.0.1.RELEASE.jar:1.0.1.RELEASE]
	at io.r2dbc.mssql.client.ReactorNettyClient.handleClose(ReactorNettyClient.java:685) ~[r2dbc-mssql-1.0.1.RELEASE.jar:1.0.1.RELEASE]
	at reactor.core.publisher.FluxPeek$PeekSubscriber.onComplete(FluxPeek.java:265) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onComplete(Operators.java:2205) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxConcatMapNoPrefetch$FluxConcatMapNoPrefetchSubscriber.onComplete(FluxConcatMapNoPrefetch.java:240) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.SinkManyUnicast.checkTerminated(SinkManyUnicast.java:389) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.SinkManyUnicast.drainRegular(SinkManyUnicast.java:274) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.SinkManyUnicast.drain(SinkManyUnicast.java:364) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.SinkManyUnicast.tryEmitComplete(SinkManyUnicast.java:203) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.SinkManySerialized.tryEmitComplete(SinkManySerialized.java:64) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.InternalManySink.emitComplete(InternalManySink.java:68) ~[reactor-core-3.5.5.jar:3.5.5]
	at io.r2dbc.mssql.client.ReactorNettyClient.resumeError(ReactorNettyClient.java:371) ~[r2dbc-mssql-1.0.1.RELEASE.jar:1.0.1.RELEASE]
	at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:94) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxFlattenIterable$FlattenIterableSubscriber.drainAsync(FluxFlattenIterable.java:351) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxFlattenIterable$FlattenIterableSubscriber.drain(FluxFlattenIterable.java:724) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxFlattenIterable$FlattenIterableSubscriber.request(FluxFlattenIterable.java:303) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.request(Operators.java:2305) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.SinkManyEmitterProcessor.drain(SinkManyEmitterProcessor.java:483) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.SinkManyEmitterProcessor$EmitterInner.drainParent(SinkManyEmitterProcessor.java:615) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxPublish$PubSubInner.request(FluxPublish.java:602) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxPeek$PeekSubscriber.request(FluxPeek.java:138) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.MonoFlatMapMany$FlatMapManyMain.request(MonoFlatMapMany.java:112) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxHandle$HandleConditionalSubscriber.request(FluxHandle.java:477) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxPeekFuseable$PeekConditionalSubscriber.request(FluxPeekFuseable.java:783) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxDoFinally$DoFinallySubscriber.request(FluxDoFinally.java:140) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxPeekFuseable$PeekConditionalSubscriber.request(FluxPeekFuseable.java:783) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxHandle$HandleConditionalSubscriber.request(FluxHandle.java:477) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxFilter$FilterSubscriber.request(FluxFilter.java:186) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxPeek$PeekSubscriber.request(FluxPeek.java:138) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxPeek$PeekSubscriber.request(FluxPeek.java:138) ~[reactor-core-3.5.5.jar:3.5.5]
	at io.r2dbc.mssql.util.FluxDiscardOnCancel$FluxDiscardOnCancelSubscriber.request(FluxDiscardOnCancel.java:115) ~[r2dbc-mssql-1.0.1.RELEASE.jar:1.0.1.RELEASE]
	at reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.request(FluxContextWrite.java:136) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxTakeUntilOther$TakeUntilMainSubscriber.request(FluxTakeUntilOther.java:182) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.SerializedSubscriber.request(SerializedSubscriber.java:151) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxWindowPredicate$WindowFlux.drainRegular(FluxWindowPredicate.java:684) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxWindowPredicate$WindowFlux.drain(FluxWindowPredicate.java:748) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxWindowPredicate$WindowFlux.request(FluxWindowPredicate.java:835) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxHandleFuseable$HandleFuseableSubscriber.request(FluxHandleFuseable.java:259) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxFlatMap$FlatMapInner.request(FluxFlatMap.java:1009) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.drainLoop(FluxFlatMap.java:730) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.drain(FluxFlatMap.java:589) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.request(FluxFlatMap.java:347) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxUsingWhen$UsingWhenSubscriber.request(FluxUsingWhen.java:319) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.Operators$DeferredSubscription.request(Operators.java:1717) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.request(Operators.java:2305) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.MonoFlatMapMany$FlatMapManyMain.request(MonoFlatMapMany.java:112) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxMap$MapSubscriber.request(FluxMap.java:164) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.request(Operators.java:2305) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxConcatArray$ConcatArraySubscriber.request(FluxConcatArray.java:276) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxPeek$PeekSubscriber.request(FluxPeek.java:138) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxPeek$PeekSubscriber.request(FluxPeek.java:138) ~[reactor-core-3.5.5.jar:3.5.5]
	at org.springframework.http.server.reactive.ChannelSendOperator$WriteBarrier.request(ChannelSendOperator.java:272) ~[spring-web-6.0.8.jar:6.0.8]
	at reactor.core.publisher.FluxMap$MapSubscriber.request(FluxMap.java:164) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.netty.channel.MonoSendMany$SendManyInner.run(MonoSendMany.java:371) ~[reactor-netty-core-1.1.6.jar:1.1.6]
	at reactor.netty.channel.MonoSendMany$SendManyInner.trySchedule(MonoSendMany.java:434) ~[reactor-netty-core-1.1.6.jar:1.1.6]
	at reactor.netty.channel.MonoSendMany$SendManyInner.trySuccess(MonoSendMany.java:606) ~[reactor-netty-core-1.1.6.jar:1.1.6]
	at reactor.netty.channel.MonoSendMany$SendManyInner.trySuccess(MonoSendMany.java:118) ~[reactor-netty-core-1.1.6.jar:1.1.6]
	at io.netty.util.concurrent.PromiseCombiner.tryPromise(PromiseCombiner.java:170) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.PromiseCombiner.access$600(PromiseCombiner.java:35) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.PromiseCombiner$1.operationComplete0(PromiseCombiner.java:62) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.PromiseCombiner$1.operationComplete(PromiseCombiner.java:44) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:590) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:557) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:492) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:636) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.DefaultPromise.setSuccess0(DefaultPromise.java:625) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.DefaultPromise.trySuccess(DefaultPromise.java:105) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.internal.PromiseNotificationUtil.trySuccess(PromiseNotificationUtil.java:48) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.ChannelOutboundBuffer.safeSuccess(ChannelOutboundBuffer.java:727) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.ChannelOutboundBuffer.remove(ChannelOutboundBuffer.java:282) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.ChannelOutboundBuffer.removeBytes(ChannelOutboundBuffer.java:362) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.epoll.AbstractEpollStreamChannel.writeBytesMultiple(AbstractEpollStreamChannel.java:305) ~[netty-transport-classes-epoll-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.epoll.AbstractEpollStreamChannel.doWriteMultiple(AbstractEpollStreamChannel.java:510) ~[netty-transport-classes-epoll-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.epoll.AbstractEpollStreamChannel.doWrite(AbstractEpollStreamChannel.java:422) ~[netty-transport-classes-epoll-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.AbstractChannel$AbstractUnsafe.flush0(AbstractChannel.java:931) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.flush0(AbstractEpollChannel.java:557) ~[netty-transport-classes-epoll-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.AbstractChannel$AbstractUnsafe.flush(AbstractChannel.java:895) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.DefaultChannelPipeline$HeadContext.flush(DefaultChannelPipeline.java:1372) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:921) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:907) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:893) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.flush(CombinedChannelDuplexHandler.java:531) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.ChannelOutboundHandlerAdapter.flush(ChannelOutboundHandlerAdapter.java:125) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.CombinedChannelDuplexHandler.flush(CombinedChannelDuplexHandler.java:356) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:923) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:907) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:893) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at reactor.netty.channel.MonoSendMany$SendManyInner$AsyncFlush.run(MonoSendMany.java:800) ~[reactor-netty-core-1.1.6.jar:1.1.6]
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:403) ~[netty-transport-classes-epoll-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]

2023-06-23T08:52:06.426+02:00 ERROR 11282 --- [or-http-epoll-3] i.r2dbc.mssql.client.ReactorNettyClient  : Error: refCnt: 0

io.netty.util.IllegalReferenceCountException: refCnt: 0
	at io.netty.buffer.AbstractByteBuf.ensureAccessible(AbstractByteBuf.java:1454) ~[netty-buffer-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.buffer.PooledUnsafeDirectByteBuf.memoryAddress(PooledUnsafeDirectByteBuf.java:241) ~[netty-buffer-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.buffer.UnsafeByteBufUtil.setBytes(UnsafeByteBufUtil.java:524) ~[netty-buffer-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:193) ~[netty-buffer-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1104) ~[netty-buffer-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1096) ~[netty-buffer-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1087) ~[netty-buffer-4.1.91.Final.jar:4.1.91.Final]
	at io.r2dbc.mssql.client.StreamDecoder$DecoderState.andChunk(StreamDecoder.java:196) ~[r2dbc-mssql-1.0.1.RELEASE.jar:1.0.1.RELEASE]
	at io.r2dbc.mssql.client.StreamDecoder.decode(StreamDecoder.java:86) ~[r2dbc-mssql-1.0.1.RELEASE.jar:1.0.1.RELEASE]
	at io.r2dbc.mssql.client.StreamDecoder.decode(StreamDecoder.java:65) ~[r2dbc-mssql-1.0.1.RELEASE.jar:1.0.1.RELEASE]
	at io.r2dbc.mssql.client.ReactorNettyClient.lambda$new$7(ReactorNettyClient.java:305) ~[r2dbc-mssql-1.0.1.RELEASE.jar:1.0.1.RELEASE]
	at reactor.core.publisher.FluxFlattenIterable$FlattenIterableSubscriber.drainAsync(FluxFlattenIterable.java:381) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxFlattenIterable$FlattenIterableSubscriber.drain(FluxFlattenIterable.java:724) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxFlattenIterable$FlattenIterableSubscriber.request(FluxFlattenIterable.java:303) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.request(Operators.java:2305) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.SinkManyEmitterProcessor.drain(SinkManyEmitterProcessor.java:483) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.SinkManyEmitterProcessor$EmitterInner.drainParent(SinkManyEmitterProcessor.java:615) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxPublish$PubSubInner.request(FluxPublish.java:602) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxPeek$PeekSubscriber.request(FluxPeek.java:138) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.MonoFlatMapMany$FlatMapManyMain.request(MonoFlatMapMany.java:112) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxHandle$HandleConditionalSubscriber.request(FluxHandle.java:477) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxPeekFuseable$PeekConditionalSubscriber.request(FluxPeekFuseable.java:783) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxDoFinally$DoFinallySubscriber.request(FluxDoFinally.java:140) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxPeekFuseable$PeekConditionalSubscriber.request(FluxPeekFuseable.java:783) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxHandle$HandleConditionalSubscriber.request(FluxHandle.java:477) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxFilter$FilterSubscriber.request(FluxFilter.java:186) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxPeek$PeekSubscriber.request(FluxPeek.java:138) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxPeek$PeekSubscriber.request(FluxPeek.java:138) ~[reactor-core-3.5.5.jar:3.5.5]
	at io.r2dbc.mssql.util.FluxDiscardOnCancel$FluxDiscardOnCancelSubscriber.request(FluxDiscardOnCancel.java:115) ~[r2dbc-mssql-1.0.1.RELEASE.jar:1.0.1.RELEASE]
	at reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.request(FluxContextWrite.java:136) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxTakeUntilOther$TakeUntilMainSubscriber.request(FluxTakeUntilOther.java:182) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.SerializedSubscriber.request(SerializedSubscriber.java:151) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxWindowPredicate$WindowFlux.drainRegular(FluxWindowPredicate.java:684) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxWindowPredicate$WindowFlux.drain(FluxWindowPredicate.java:748) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxWindowPredicate$WindowFlux.request(FluxWindowPredicate.java:835) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxHandleFuseable$HandleFuseableSubscriber.request(FluxHandleFuseable.java:259) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxFlatMap$FlatMapInner.request(FluxFlatMap.java:1009) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.drainLoop(FluxFlatMap.java:730) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.drain(FluxFlatMap.java:589) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.request(FluxFlatMap.java:347) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxUsingWhen$UsingWhenSubscriber.request(FluxUsingWhen.java:319) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.Operators$DeferredSubscription.request(Operators.java:1717) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.request(Operators.java:2305) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.MonoFlatMapMany$FlatMapManyMain.request(MonoFlatMapMany.java:112) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxMap$MapSubscriber.request(FluxMap.java:164) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.request(Operators.java:2305) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxConcatArray$ConcatArraySubscriber.request(FluxConcatArray.java:276) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxPeek$PeekSubscriber.request(FluxPeek.java:138) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxPeek$PeekSubscriber.request(FluxPeek.java:138) ~[reactor-core-3.5.5.jar:3.5.5]
	at org.springframework.http.server.reactive.ChannelSendOperator$WriteBarrier.request(ChannelSendOperator.java:272) ~[spring-web-6.0.8.jar:6.0.8]
	at reactor.core.publisher.FluxMap$MapSubscriber.request(FluxMap.java:164) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.netty.channel.MonoSendMany$SendManyInner.run(MonoSendMany.java:371) ~[reactor-netty-core-1.1.6.jar:1.1.6]
	at reactor.netty.channel.MonoSendMany$SendManyInner.trySchedule(MonoSendMany.java:434) ~[reactor-netty-core-1.1.6.jar:1.1.6]
	at reactor.netty.channel.MonoSendMany$SendManyInner.trySuccess(MonoSendMany.java:606) ~[reactor-netty-core-1.1.6.jar:1.1.6]
	at reactor.netty.channel.MonoSendMany$SendManyInner.trySuccess(MonoSendMany.java:118) ~[reactor-netty-core-1.1.6.jar:1.1.6]
	at io.netty.util.concurrent.PromiseCombiner.tryPromise(PromiseCombiner.java:170) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.PromiseCombiner.access$600(PromiseCombiner.java:35) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.PromiseCombiner$1.operationComplete0(PromiseCombiner.java:62) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.PromiseCombiner$1.operationComplete(PromiseCombiner.java:44) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:590) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:557) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:492) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:636) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.DefaultPromise.setSuccess0(DefaultPromise.java:625) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.DefaultPromise.trySuccess(DefaultPromise.java:105) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.internal.PromiseNotificationUtil.trySuccess(PromiseNotificationUtil.java:48) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.ChannelOutboundBuffer.safeSuccess(ChannelOutboundBuffer.java:727) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.ChannelOutboundBuffer.remove(ChannelOutboundBuffer.java:282) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.ChannelOutboundBuffer.removeBytes(ChannelOutboundBuffer.java:362) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.epoll.AbstractEpollStreamChannel.writeBytesMultiple(AbstractEpollStreamChannel.java:305) ~[netty-transport-classes-epoll-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.epoll.AbstractEpollStreamChannel.doWriteMultiple(AbstractEpollStreamChannel.java:510) ~[netty-transport-classes-epoll-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.epoll.AbstractEpollStreamChannel.doWrite(AbstractEpollStreamChannel.java:422) ~[netty-transport-classes-epoll-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.AbstractChannel$AbstractUnsafe.flush0(AbstractChannel.java:931) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.flush0(AbstractEpollChannel.java:557) ~[netty-transport-classes-epoll-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.AbstractChannel$AbstractUnsafe.flush(AbstractChannel.java:895) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.DefaultChannelPipeline$HeadContext.flush(DefaultChannelPipeline.java:1372) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:921) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:907) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:893) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.flush(CombinedChannelDuplexHandler.java:531) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.ChannelOutboundHandlerAdapter.flush(ChannelOutboundHandlerAdapter.java:125) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.CombinedChannelDuplexHandler.flush(CombinedChannelDuplexHandler.java:356) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:923) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:907) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:893) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at reactor.netty.channel.MonoSendMany$SendManyInner$AsyncFlush.run(MonoSendMany.java:800) ~[reactor-netty-core-1.1.6.jar:1.1.6]
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:403) ~[netty-transport-classes-epoll-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]

2023-06-23T08:52:06.428+02:00 ERROR 11282 --- [or-http-epoll-3] reactor.core.publisher.Operators         : Operator called default onErrorDropped

io.r2dbc.mssql.client.ReactorNettyClient$MssqlConnectionClosedException: Connection closed
	at io.r2dbc.mssql.client.ReactorNettyClient.lambda$static$1(ReactorNettyClient.java:99) ~[r2dbc-mssql-1.0.1.RELEASE.jar:1.0.1.RELEASE]
	at io.r2dbc.mssql.client.ReactorNettyClient.drainError(ReactorNettyClient.java:702) ~[r2dbc-mssql-1.0.1.RELEASE.jar:1.0.1.RELEASE]
	at io.r2dbc.mssql.client.ReactorNettyClient.handleClose(ReactorNettyClient.java:687) ~[r2dbc-mssql-1.0.1.RELEASE.jar:1.0.1.RELEASE]
	at io.r2dbc.mssql.client.ReactorNettyClient.access$800(ReactorNettyClient.java:91) ~[r2dbc-mssql-1.0.1.RELEASE.jar:1.0.1.RELEASE]
	at io.r2dbc.mssql.client.ReactorNettyClient$2.onComplete(ReactorNettyClient.java:336) ~[r2dbc-mssql-1.0.1.RELEASE.jar:1.0.1.RELEASE]
	at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onComplete(Operators.java:2205) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.Operators.complete(Operators.java:137) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.MonoEmpty.subscribe(MonoEmpty.java:46) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.Mono.subscribe(Mono.java:4485) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:103) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxFlattenIterable$FlattenIterableSubscriber.drainAsync(FluxFlattenIterable.java:351) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxFlattenIterable$FlattenIterableSubscriber.drain(FluxFlattenIterable.java:724) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxFlattenIterable$FlattenIterableSubscriber.request(FluxFlattenIterable.java:303) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.request(Operators.java:2305) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.SinkManyEmitterProcessor.drain(SinkManyEmitterProcessor.java:483) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.SinkManyEmitterProcessor$EmitterInner.drainParent(SinkManyEmitterProcessor.java:615) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxPublish$PubSubInner.request(FluxPublish.java:602) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxPeek$PeekSubscriber.request(FluxPeek.java:138) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.MonoFlatMapMany$FlatMapManyMain.request(MonoFlatMapMany.java:112) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxHandle$HandleConditionalSubscriber.request(FluxHandle.java:477) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxPeekFuseable$PeekConditionalSubscriber.request(FluxPeekFuseable.java:783) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxDoFinally$DoFinallySubscriber.request(FluxDoFinally.java:140) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxPeekFuseable$PeekConditionalSubscriber.request(FluxPeekFuseable.java:783) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxHandle$HandleConditionalSubscriber.request(FluxHandle.java:477) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxFilter$FilterSubscriber.request(FluxFilter.java:186) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxPeek$PeekSubscriber.request(FluxPeek.java:138) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxPeek$PeekSubscriber.request(FluxPeek.java:138) ~[reactor-core-3.5.5.jar:3.5.5]
	at io.r2dbc.mssql.util.FluxDiscardOnCancel$FluxDiscardOnCancelSubscriber.request(FluxDiscardOnCancel.java:115) ~[r2dbc-mssql-1.0.1.RELEASE.jar:1.0.1.RELEASE]
	at reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.request(FluxContextWrite.java:136) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxTakeUntilOther$TakeUntilMainSubscriber.request(FluxTakeUntilOther.java:182) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.SerializedSubscriber.request(SerializedSubscriber.java:151) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxWindowPredicate$WindowFlux.drainRegular(FluxWindowPredicate.java:684) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxWindowPredicate$WindowFlux.drain(FluxWindowPredicate.java:748) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxWindowPredicate$WindowFlux.request(FluxWindowPredicate.java:835) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxHandleFuseable$HandleFuseableSubscriber.request(FluxHandleFuseable.java:259) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxFlatMap$FlatMapInner.request(FluxFlatMap.java:1009) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.drainLoop(FluxFlatMap.java:730) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.drain(FluxFlatMap.java:589) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxFlatMap$FlatMapMain.request(FluxFlatMap.java:347) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxUsingWhen$UsingWhenSubscriber.request(FluxUsingWhen.java:319) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.Operators$DeferredSubscription.request(Operators.java:1717) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.request(Operators.java:2305) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.MonoFlatMapMany$FlatMapManyMain.request(MonoFlatMapMany.java:112) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxMap$MapSubscriber.request(FluxMap.java:164) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.request(Operators.java:2305) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxConcatArray$ConcatArraySubscriber.request(FluxConcatArray.java:276) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxPeek$PeekSubscriber.request(FluxPeek.java:138) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.core.publisher.FluxPeek$PeekSubscriber.request(FluxPeek.java:138) ~[reactor-core-3.5.5.jar:3.5.5]
	at org.springframework.http.server.reactive.ChannelSendOperator$WriteBarrier.request(ChannelSendOperator.java:272) ~[spring-web-6.0.8.jar:6.0.8]
	at reactor.core.publisher.FluxMap$MapSubscriber.request(FluxMap.java:164) ~[reactor-core-3.5.5.jar:3.5.5]
	at reactor.netty.channel.MonoSendMany$SendManyInner.run(MonoSendMany.java:371) ~[reactor-netty-core-1.1.6.jar:1.1.6]
	at reactor.netty.channel.MonoSendMany$SendManyInner.trySchedule(MonoSendMany.java:434) ~[reactor-netty-core-1.1.6.jar:1.1.6]
	at reactor.netty.channel.MonoSendMany$SendManyInner.trySuccess(MonoSendMany.java:606) ~[reactor-netty-core-1.1.6.jar:1.1.6]
	at reactor.netty.channel.MonoSendMany$SendManyInner.trySuccess(MonoSendMany.java:118) ~[reactor-netty-core-1.1.6.jar:1.1.6]
	at io.netty.util.concurrent.PromiseCombiner.tryPromise(PromiseCombiner.java:170) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.PromiseCombiner.access$600(PromiseCombiner.java:35) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.PromiseCombiner$1.operationComplete0(PromiseCombiner.java:62) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.PromiseCombiner$1.operationComplete(PromiseCombiner.java:44) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:590) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:557) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:492) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:636) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.DefaultPromise.setSuccess0(DefaultPromise.java:625) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.DefaultPromise.trySuccess(DefaultPromise.java:105) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.internal.PromiseNotificationUtil.trySuccess(PromiseNotificationUtil.java:48) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.ChannelOutboundBuffer.safeSuccess(ChannelOutboundBuffer.java:727) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.ChannelOutboundBuffer.remove(ChannelOutboundBuffer.java:282) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.ChannelOutboundBuffer.removeBytes(ChannelOutboundBuffer.java:362) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.epoll.AbstractEpollStreamChannel.writeBytesMultiple(AbstractEpollStreamChannel.java:305) ~[netty-transport-classes-epoll-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.epoll.AbstractEpollStreamChannel.doWriteMultiple(AbstractEpollStreamChannel.java:510) ~[netty-transport-classes-epoll-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.epoll.AbstractEpollStreamChannel.doWrite(AbstractEpollStreamChannel.java:422) ~[netty-transport-classes-epoll-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.AbstractChannel$AbstractUnsafe.flush0(AbstractChannel.java:931) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.flush0(AbstractEpollChannel.java:557) ~[netty-transport-classes-epoll-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.AbstractChannel$AbstractUnsafe.flush(AbstractChannel.java:895) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.DefaultChannelPipeline$HeadContext.flush(DefaultChannelPipeline.java:1372) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:921) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:907) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:893) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.flush(CombinedChannelDuplexHandler.java:531) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.ChannelOutboundHandlerAdapter.flush(ChannelOutboundHandlerAdapter.java:125) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.CombinedChannelDuplexHandler.flush(CombinedChannelDuplexHandler.java:356) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:923) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:907) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:893) ~[netty-transport-4.1.91.Final.jar:4.1.91.Final]
	at reactor.netty.channel.MonoSendMany$SendManyInner$AsyncFlush.run(MonoSendMany.java:800) ~[reactor-netty-core-1.1.6.jar:1.1.6]
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:403) ~[netty-transport-classes-epoll-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.91.Final.jar:4.1.91.Final]
	at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]

@stephanpelikan
Copy link

I think I figured out the root cause of this:

As mentioned in README.md this driver uses direct execution per default. This does not support back-pressure handling! If your client is not able to forward data as fast as the database wants to push records then the database drops the connection.

A workaround for this is to use cursor based execution by setting property preferCursoredExecution (see README.md section Supported ConnectionFactory Discovery Options).

This solved the problem for me 😃.

(Unfortunately, as this is solved now I see another error is rare cases: Could not find prepared statement with handle 1073741825. I will create a separate issue for this)

@mp911de
Copy link
Member

mp911de commented Jun 29, 2023

Thanks a lot for your investigation, I'd be never able to find that cause without having your context ❤️.

We addressed the prepared statement issue with #271. Can you retest with the latest snapshot to see whether the issue is resolved for you?

I'd appreciate a reproducer for the case you mentioned. Maybe there is something we can still do from our side to capture the critical limit of queued responses so that we either do something smart about it or that we terminate the connection with a more meaningful exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-feedback We need additional information before we can continue
Projects
None yet
Development

No branches or pull requests

4 participants