View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000559 | Pgpool-II | Bug | public | 2019-11-20 19:28 | 2020-04-14 13:08 |
| Reporter | pdomagala | Assigned To | pengbo | ||
| Priority | high | Severity | major | Reproducibility | sometimes |
| Status | closed | Resolution | open | ||
| Product Version | 4.1.0 | ||||
| Summary | 0000559: Randomly closed connections | ||||
| Description | We've running latest PGPool v4.1.0 in docker container. Everything works flawlessly, but sometimes (under higher usage/traffic) our app returns ``` PG::UnableToSend: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. ``` Also we see in PostgreSQL logs something like this: ``` 2019-11-19 18:13:19 GMT LOG: could not receive data from client: Connection reset by peer 2019-11-19 18:13:19 GMT LOG: unexpected EOF on client connection with an open transaction ```. PGPool and Postgresql configurations attached. | ||||
| Steps To Reproduce | Those errors are pretty random, we can't reproduce it. But it occurs at least a few times per hour. | ||||
| Tags | No tags attached. | ||||
|
|
|
|
|
also we use PostgreSQL 10.9-1. |
|
|
``` 2019-11-19 18:13:19 GMT LOG: could not receive data from client: Connection reset by peer 2019-11-19 18:13:19 GMT LOG: unexpected EOF on client connection with an open transaction ``` The reason the connection from client is dropped. If your application connects to PostgreSQL directly, does it occur? |
|
|
No, we don't have such issues when app is connected to PostgreSQL directly. Is there any chance that is occuring because we don't have enabled SSL on frontend (app->pgpool)? Also we have set `client_idle_limit = 30`, so PGPool should kill idle connections after 30 seconds, but I see there are a lot of unclosed connections even after a couple of minutes of disconnecting app. |
|
|
> No, we don't have such issues when app is connected to PostgreSQL directly. Is there any chance that is occuring because we don't have enabled SSL on frontend (app->pgpool)? I don't think this is the reason. Could you share pgpool.log including "2019-11-19 18:13:19"? |
|
|
I've more recent logs: APP: ``` 2019-11-22T14:51:40.140Z 1 TID-ouq0pxufd WARN: ActiveRecord::StatementInvalid: PG::ConnectionBad: PQconsumeInput() server closed the connection unexpectedly 2019-11-22T14:51:11.062Z 1 TID-ouxkp800l WARN: ActiveRecord::StatementInvalid: PG::ConnectionBad: PQconsumeInput() server closed the connection unexpectedly ``` PGPool and PG logs attached to this comment. |
|
|
I have checked pgpool.log, but I could not find any errors. Is the transaction aborted, when the connection from app is disconnected. Can you confirm the status of the process using "ps auxwww" command, when this error occurs? |
|
|
> Also we have set `client_idle_limit = 30`, so PGPool should kill idle connections after 30 seconds, but I see there are a lot of unclosed connections even after a couple of minutes of disconnecting app. "client_idle_limit" is the parameter to kill the idle connection between client and pgpool. If you want to close connections to backend, you need to config "child_life_time" or "connection_life_time" parameter. |
|
|
If you have resolved this issue, may I close this one? |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2019-11-20 19:28 | pdomagala | New Issue | |
| 2019-11-20 19:28 | pdomagala | File Added: pgpool.conf | |
| 2019-11-20 19:28 | pdomagala | File Added: pg.conf | |
| 2019-11-20 19:35 | pdomagala | Note Added: 0002971 | |
| 2019-11-21 09:34 | pengbo | Note Added: 0002974 | |
| 2019-11-21 18:26 | pdomagala | Note Added: 0002975 | |
| 2019-11-22 13:11 | pengbo | Note Added: 0002976 | |
| 2019-11-23 00:10 | pdomagala | File Added: pgpool.log | |
| 2019-11-23 00:10 | pdomagala | File Added: pg.log | |
| 2019-11-23 00:10 | pdomagala | Note Added: 0002977 | |
| 2019-11-27 22:45 | pengbo | Assigned To | => pengbo |
| 2019-11-27 22:45 | pengbo | Status | new => assigned |
| 2019-11-27 22:45 | pengbo | Description Updated | |
| 2019-11-27 22:54 | pengbo | Note Added: 0002980 | |
| 2019-11-27 23:35 | pengbo | Note Added: 0002981 | |
| 2020-02-03 10:56 | pengbo | Status | assigned => feedback |
| 2020-02-03 10:56 | pengbo | Note Added: 0003119 | |
| 2020-04-14 13:08 | pengbo | Status | feedback => closed |