Closed stefannegele closed 2 years ago
We fixed the issue in R2DBC pool just yesterday with #140. There are a few potential leaks in Spring Framework so I'd ask you to file your ticket at https://github.com/spring-projects/spring-framework/issues.
Sorry for the duplicate. Did not catch the other issue, because it was raised while i was still investigating. I will now wait for a new release of the pool and run my tests with the new version again. Thanks a lot!
Bug Report
Versions
Current Behavior
When a subscriber sends a cancellation signal upstream, connections might not get closed. This produces connections leaks which lead to non-responding applications in the long term.
Table schema
Input Code
```sql create extension if not exists "uuid-ossp"; create table if not exists test_entity ( id uuid default public.uuid_generate_v4(), name text not null, primary key (id) ); ```Steps to reproduce
Input Code
```kotlin private val logger = LoggerFactory.getLogger("StressTest") fun main(args: ArrayI also created a demo where this occurs in combination with a netty based spring webflux setup here, that's how i found out about this. This example uses spring boot r2dbc. https://github.com/stefannegele/connection-leak-demo
Expected behavior/code
Connection does not leak.