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

Pool hangs when trying to get connections wich closed on server timeout (they remain idle in pool) #42

Closed
MisteryX opened this issue Oct 24, 2019 · 6 comments
Labels
for: external-project For an external project and not something we can fix

Comments

@MisteryX
Copy link

MisteryX commented Oct 24, 2019

Case:

  1. Executing queries in pool (releasing connections)
  2. Waiting sometime until server timeout is reached on pooled connections
  3. Trying to get connection from pool and... it hangs entire application forever (pool exhausted)
    When it hangs:
    ERROR [lettuce-epollEventLoop-4-2] dev.miku.r2dbc.mysql.client.ReactorNettyClient: Exchange cancelled while exchange is active. This is likely a bug leading to unpredictable outcome.

Mysql server 5.7.27, timeout = 180s

spring.r2dbc.connection-timeout=3s
spring.r2dbc.pool.initial-size=10
spring.r2dbc.pool.max-size=200
spring.r2dbc.pool.max-idle-time=10s
spring.r2dbc.pool.validation-query=SELECT 1
spring.r2dbc.pool.max-create-connection-time=3s
spring.r2dbc.pool.max-acquire-time=5s
spring.r2dbc.pool.max-life-time=180s

spring-data-r2dbc
1.0.0.RC1

r2dbc-pool
0.8.0.RC1

r2dbc-mysql
0.8.0.RC2

@mp911de
Copy link
Member

mp911de commented Oct 24, 2019

Not sure this is a pool issue. Looks more related to the driver /cc @mirromutth

@MisteryX
Copy link
Author

Connections with server timeout remain in pool as idle. If the most of the connections in pool stay idle but in fact they are closed...

@MisteryX
Copy link
Author

I think, should be a trigger that processes events of server timeout/shutdown for particular connection in pool and actualizes connection statuses

@mp911de
Copy link
Member

mp911de commented Oct 25, 2019

Yeah, that's already on our radar, see r2dbc/r2dbc-spi#35.

@MisteryX
Copy link
Author

MisteryX commented Oct 25, 2019 via email

@mp911de
Copy link
Member

mp911de commented Oct 25, 2019

A driver/pool impl cannot implement anything that isn’t specified yet.

@mp911de mp911de closed this as completed Nov 5, 2019
@mp911de mp911de added the for: external-project For an external project and not something we can fix label Nov 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: external-project For an external project and not something we can fix
Projects
None yet
Development

No branches or pull requests

2 participants