View Issue Details

IDProjectCategoryView StatusLast Update
0000683Pgpool-IIBugpublic2023-11-17 23:53
Reporterhai.nguyentien Assigned Topengbo  
PriorityhighSeveritycrashReproducibilityalways
Status assignedResolutionopen 
Product Version4.2.1 
Summary0000683: Application couldn't connect to Postgres DB via pgpool
DescriptionWe are using pgpool version 4.2.1 (Release Date: 2020-12-23), which is middleware between Odoo web server and AWS RDS Postgres. Our purpose is to use pgpool for load-balancing READ queries between master instance and read-replia instance in AWS RDS.

Our issue:
After a few client connections, web server showed that it couldn't connect to database. We restarted pgpool service, it's working well but the DB connection problem still occured after few client connections. We tried to connect web server directly to AWS RDS, it's working normally.

I've attached some information as the following:
1) Our architecture
2) Logs on web server
3) Logs on pgpool
4) pgpool configuration file

Tagspgpool in load balancing mode

Activities

hai.nguyentien

2021-01-14 12:06

reporter  

pgpool log01.PNG (95,056 bytes)   
pgpool log01.PNG (95,056 bytes)   
pgpool log2.PNG (350,492 bytes)
Architecture.PNG (116,173 bytes)   
Architecture.PNG (116,173 bytes)   
pgpool.conf (46,963 bytes)

pengbo

2021-01-14 14:22

developer   ~0003722

------
ERROR: unable to read data from frontend
DETAIL: EOF encountered with frontend
------
This error may occur because the application doesn't close the connection to pgpool.
Does your application use connection pooling to keep the connections open to pgpool?

In this case, you may need to specify the parameter "client_idle_limit" to setting a timeout to disconnect a client if it remains idle since the last query.

For example,

  client_idle_limit = 60;

https://www.pgpool.net/docs/latest/en/html/runtime-config-connection-pooling.html#GUC-CLIENT-IDLE-LIMIT

hai.nguyentien

2021-02-26 14:02

reporter   ~0003754

Hi Pengbo,

Does your application use connection pooling to keep the connections open to pgpool?
--> Yes, our app is using connection pooling.
I specified the parameter "client_idle_limit" in pgpool-II. After several weeks, we got the attached logs and our app could not access DB through pgpool-II. Could you please help us?

Thank you very much!

hai.nguyentien

2021-02-26 14:03

reporter   ~0003755

I've attached logs picture!
pgpool3.PNG (70,605 bytes)   
pgpool3.PNG (70,605 bytes)   

hai.nguyentien

2021-03-03 12:03

reporter   ~0003756

Hi Pengbo,

Can you help me regarding above issue?

Thank you very much!

pengbo

2021-03-17 18:39

developer   ~0003773

Sorry for late response.

> I specified the parameter "client_idle_limit" in pgpool-II.
> After several weeks, we got the attached logs and our app could not access DB through pgpool-II. Could you please help us?

I would confirm pgpool and postgresql status, could you share the following information?

(1)
When your application could not access DB through pgpool, could you show me the process status of pgpool and progress?
Please share the result of the following command.

----------------------
ps -ef | grep pgpool
ps -ef | grep postgres
----------------------

(2) Connect to DB and run the following query.

----------------------
select * from pg_stat_activity where backend_type = 'client backend';
----------------------

garyqiu

2023-11-17 23:53

reporter   ~0004442

Hi hai.nguyentien

Has your issue been resolved? If yes, could you describe how you resolved it?

Thanks
Gary

Issue History

Date Modified Username Field Change
2021-01-14 12:06 hai.nguyentien New Issue
2021-01-14 12:06 hai.nguyentien File Added: odoo log.png
2021-01-14 12:06 hai.nguyentien File Added: pgpool log01.PNG
2021-01-14 12:06 hai.nguyentien File Added: pgpool log2.PNG
2021-01-14 12:06 hai.nguyentien File Added: Architecture.PNG
2021-01-14 12:06 hai.nguyentien File Added: pgpool.conf
2021-01-14 12:06 hai.nguyentien Tag Attached: pgpool in load balancing mode
2021-01-14 14:16 pengbo Assigned To => pengbo
2021-01-14 14:16 pengbo Status new => assigned
2021-01-14 14:16 pengbo Description Updated
2021-01-14 14:22 pengbo Note Added: 0003722
2021-01-14 14:23 pengbo Status assigned => feedback
2021-01-14 16:32 hai.nguyentien Status feedback => assigned
2021-01-14 16:35 pengbo File Deleted: odoo log.png
2021-01-19 11:31 pengbo Status assigned => feedback
2021-02-26 14:02 hai.nguyentien Note Added: 0003754
2021-02-26 14:02 hai.nguyentien Status feedback => assigned
2021-02-26 14:03 hai.nguyentien File Added: pgpool3.PNG
2021-02-26 14:03 hai.nguyentien Note Added: 0003755
2021-03-03 12:03 hai.nguyentien Note Added: 0003756
2021-03-17 18:39 pengbo Note Added: 0003773
2023-11-17 23:53 garyqiu Note Added: 0004442