View Issue Details

IDProjectCategoryView StatusLast Update
0000656Pgpool-IIBugpublic2020-11-19 14:26
Reporterwjuszko Assigned Tot-ishii  
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionopen 
PlatformLinuxOSUbuntuOS Version20.04
Product Version4.1.1 
Target Version4.1.5Fixed in Version4.1.5 
Summary0000656: Child connection counter issue if query cancelled
DescriptionIf a running query has been canceled and the connection has been closed, the child connection counter is not decrease it value. The child processes are closed, but when the counter reaches (num_init_children - reserved_connections) it wont allow any more connections :

FATAL: sorry, too many clients already

Steps To Reproduce1, Set num_init_children = 8 and start pgpool
2, Open psql to pgpool and check child process created (pgpool: testdb testdb 172.20.0.1(56804) idle)
3, run this query: select pg_sleep('60'); and verify the child process (pgpool: testdb testdb 172.20.0.1(56804) SELECT)
4, press Ctrl + C to cancel the query and verify the child process switched back to idle (pgpool: testdb testdb 172.20.0.1(56804) idle)
5, exit to psql to close the connection and verify the child process ended too
6, repeat from point 2 until you get: FATAL: sorry, too many clients already
Additional InformationAccording to Pgpool logs (at verbosity DEBUG5) the connection counter value increasing like:
connection_count_down: number of connected children: 2
connection_count_down: number of connected children: 3
connection_count_down: number of connected children: 4
connection_count_down: number of connected children: 5
connection_count_down: number of connected children: 6
connection_count_down: number of connected children: 7
connection_count_down: number of connected children: 8
TagsNo tags attached.

Activities

wjuszko

2020-10-29 21:21

reporter  

pgpool.conf (43,561 bytes)

t-ishii

2020-10-29 22:02

developer   ~0003590

Good catch! It is caused a bug of Pgpool-II. Can you please try out attached patch?
cancel_4_1.diff (323 bytes)   
cancel_4_1.diff (323 bytes)   

wjuszko

2020-10-30 05:04

reporter   ~0003592

Thank You for the very quick answer. The fix worked for me as expected.
Do You now when (what version) it will be go live?

t-ishii

2020-10-30 06:40

developer   ~0003593

We plan to release next minor releases on November 19.
https://pgpool.net/mediawiki/index.php/Roadmap

AS for 4.1 series, next version will be 4.1.5.

administrator

2020-11-19 14:26

administrator   ~0003599

4.1.5 released.
Close issue.

Issue History

Date Modified Username Field Change
2020-10-29 20:07 wjuszko New Issue
2020-10-29 21:21 wjuszko File Added: pgpool.conf
2020-10-29 22:02 t-ishii File Added: cancel_4_1.diff
2020-10-29 22:02 t-ishii Note Added: 0003590
2020-10-29 22:03 t-ishii Assigned To => t-ishii
2020-10-29 22:03 t-ishii Status new => feedback
2020-10-30 05:04 wjuszko Note Added: 0003592
2020-10-30 05:04 wjuszko Status feedback => assigned
2020-10-30 06:40 t-ishii Note Added: 0003593
2020-10-30 06:40 t-ishii Target Version => 4.1.5
2020-10-30 06:40 t-ishii Status assigned => resolved
2020-11-19 14:26 administrator Status resolved => closed
2020-11-19 14:26 administrator Fixed in Version => 4.1.5
2020-11-19 14:26 administrator Note Added: 0003599