Connection not released when request is cancelled
See original GitHub issueBug Report
Versions
- Driver: Driver: 0.8.8.RELEASE
- Database: Posgresql 12.7
- Java: 11
- OS: Windows
Current Behavior
This issue was first opened on r2dbc-postgresql, some discussion can be seen there https://github.com/pgjdbc/r2dbc-postgresql/issues/459
Then it was opened here: https://github.com/r2dbc/r2dbc-pool/issues/140
The result was a fix on the pool but it does not fix the problem.
We have created a new project without spring dependencies and the connection keeps getting stucked.
You can find the source code here: https://github.com/jfrossetto/r2dbc-stress-cancel
pid | datname | usename | application_name | backend_start | query_start | query |
---|---|---|---|---|---|---|
3065 | postgres | postgres | sample | 2021-11-01 10:02:41.308 | 2021-11-01 10:02:45.159 | SELECT 1 |
3064 | postgres | postgres | sample | 2021-11-01 10:02:41.307 | 2021-11-01 10:02:46.358 | SELECT 1 |
3066 | postgres | postgres | sample | 2021-11-01 10:02:45.640 | 2021-11-01 10:02:50.739 | SELECT 1 |
LOGFILE: https://github.com/jfrossetto/r2dbc-stress-cancel/blob/master/log_stresscancel.txt
There was another issue opened with the same problem here: https://github.com/r2dbc/r2dbc-pool/issues/143
Stack trace
// your stack trace here
Table schema
Input Code
-- your SQL here;
Steps to reproduce
Input Code
// your code here;
Expected behavior/code
Possible Solution
Additional context
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:20 (7 by maintainers)
Top Results From Across the Web
Connection not released when request is cancelled · Issue #140
When these requests gets cancelled right after the validation query have runned establishing the connection as healthy, and before the real SQL ...
Read more >r2dbc-pool connection not released after cancel - Stack Overflow
MOST IMPORTANTLY: some of the connections are acquired and never gets released, even if all threads are cancelled and none are active anymore....
Read more >I canceled my request in ILLiad, but it is not showing as ...
Here are the steps you can take to make sure the request is canceled on OCLC. Restart your ILLiad Connection Manager service on...
Read more >node-mssql | Microsoft SQL Server client for Node.js
ECANCEL ( RequestError ) - Cancelled. ENOCONN ( RequestError ) - No connection is specified for that request. ENOTOPEN ( ConnectionError ) -...
Read more >How to detect if a request was cancelled from client on Ktor ...
I can successfully see that the connection has been terminated on the server and I have the opportunity to release any hang resources....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can confirm that upgrading to Reactor Core 3.4.14 snapshots fixes the issue.
Commenting for increased visibility - looks like the
reactor-core
team has a potential solution, see https://github.com/reactor/reactor-core/pull/2859 .If you can reproduce the issue locally, confirmation that the fix works is desired. See https://github.com/reactor/reactor-core/issues/2836#issuecomment-999797297 .