We’re encountering an issue with the Read Replica setup in Open Telecom Cloud, which is somewhat similar to AWS but with fewer features. We’re seeking any insights into potential causes of this problem.
Intermittently, when we attempt to connect to the postgres V12.16 read replica via pgbouncer inside a K8s cluster, we receive the following error:
[suite-app] datetime[error] [exception.CDbException] SQLSTATE[HY000]: General error: 7 server closed the connection unexpectedly
[suite-app] This probably means the server terminated abnormally
[suite-app] before or while processing the request.
Interestingly, if we connect the application directly to the read replica without pgbouncer, everything works fine. Similarly, if we direct the pgbouncer for the read-only queries at the read-write instance, there are no issues. The problem only arises when we combine the use of pgbouncer with the read replica.
We’ve experimented with both the new version of pgbouncer, which can handle read-write and read-only through a single pgbouncer, and setting up a second pgbouncer using the old container pgbouncer container image exclusively for the read replica. Unfortunately, both approaches result in the same issue.
Our current setup includes a single read replica with a static IP, which we’re using in the pgbouncer config. All PostgreSQL configuration values on the Read Replica match those on the primary instance, and both have identical specifications in terms of CPU and memory.
We would greatly appreciate any suggestions for resolving this issue or gathering more data to identify the cause.