mirromutth / r2dbc-mysql

R2DBC MySQL Implementation
Apache License 2.0
656 stars 98 forks source link

Request queue was disposed #241

Open sumitsum opened 2 years ago

sumitsum commented 2 years ago

Sometimes the connection fails to run and throws the following exception. Need some help to understand what could cause this:

java.lang.IllegalStateException: Request queue was disposed
    at dev.miku.r2dbc.mysql.client.RequestQueue.requireDisposed(RequestQueue.java:150)
    at dev.miku.r2dbc.mysql.client.RequestQueue.dispose(RequestQueue.java:139)
    at dev.miku.r2dbc.mysql.client.MessageDuplexCodec.channelInactive(MessageDuplexCodec.java:131)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:241)
1528110566 commented 2 years ago

I have the same question, especially in a pressure test. The sequence(Mono) won't go on, and the exception same as above had been thrown after several hours with no regularity. OnError signal was emitted after the exception. I caught tcp packages, and they shows that no database requests were send. So I guess something must wrong in the driver, maybe in the request queue? Because the dump file shows they are bigger than usual. Hope not my Mysql special edition's fault.

ich247 commented 1 year ago

Hello, We have been seeing the issue and it's causing big trouble as the spring boot app hangs while connecting to DB. I could actually do /actuator/info and it immediately responds but /actuator/heath just hangs indefinitely and as a result the app becomes unreachable. We tried playing around with r2dbc pool configs properties but none of them permanently fixed this issue. e.g. increasing pool size, adding max-life-time etc.

We are seeing so many of exceptions exactly like above.

java.lang.IllegalStateException: Request queue was disposed 
at dev.miku.r2dbc.mysql.client.RequestQueue.requireDisposed(RequestQueue.java:150)
  at dev.miku.r2dbc.mysql.client.RequestQueue.dispose(RequestQueue.java:139)
  at dev.miku.r2dbc.mysql.client.MessageDuplexCodec.channelInactive(MessageDuplexCodec.java:131)
  at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
  at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
  at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:241)
  at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:389)
  at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:354)
  at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
  at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)

I belive is is the driver issue as there has been similar issues opened in this repo. Any updates on resolution of this issue?

@mirromutth @mp911de do you think if there is any workaround we can apply in the meantime this repository releases a permanent fix for it?

Appreicate your time

ich247 commented 1 year ago

@mirromutth @mp911de Any updates on the resolution of this issue? or @sumitsum were you able to find any workaround for this? any help appreciated

mscheong01 commented 1 year ago
d.m.r.mysql.client.ReactorNettyClient    : Exit message sending failed, force closing

java.lang.IllegalStateException: Request queue was disposed
    at dev.miku.r2dbc.mysql.client.RequestQueue.requireDisposed(RequestQueue.java:150) ~[r2dbc-mysql-0.8.2.RELEASE.jar!/:0.8.2.RELEASE]
    at dev.miku.r2dbc.mysql.client.RequestQueue.dispose(RequestQueue.java:139) ~[r2dbc-mysql-0.8.2.RELEASE.jar!/:0.8.2.RELEASE]

we ran into the same issue 😢 are there any updates on this?