Skip to content

pgpool container restart #10

Description

@jhy070997

Helm chart version
postgresql-ha-7.8.2

Describe
pgpool container (inside of Pod) restart when many client session

Reproduce
Deploy chart with configs.

maxConnections: "1000" in postgresql chart value
default pgpool.conf
postgresql replicas: 3
pgpool replicas: 1 (or 3)

Create python script

from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
import os
from urllib.parse import quote

for i in range(500):
    engine = create_engine("postgresql://[USER]:%s@[IP]:[PORT]/[DB]" % quote('pass'))
    db = scoped_session(sessionmaker(bind=engine))
    pid = os.getpid()
    cmd_sql = "INSERT INTO test (pid) VALUES ('"+str(pid)+"');"
    print(cmd_sql)
    db.execute(cmd_sql)
    db.commit()
    db.close()

Execute script with different shell terminal (create multiple process)
Data will be inserted. and stop when 80~90 records were inserted and container will restart with log below

2021-09-16 03:56:27: pid 1: LOG:  shutting down
2021-09-16 03:56:27: pid 1: LOG:  terminating all child processes

Expected behavior
A clear and concise description of what you expected to happen.
child process of pgpool is 32.
max_pool is 15.
so pgpool can accept 480 sessions. (at least 480 data would be inserted)

Version of Helm and Kubernetes:
Output of helm version:

version.BuildInfo{Version:"v3.6.3", GitCommit:"d506314abfb5d21419df8c7e7e68012379db2354", GitTreeState:"clean", GoVersion:"go1.16.5"}

Output of kubectl version:

Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.0", GitCommit:"cb303e613a121a29364f75cc67d3d580833a7479", GitTreeState:"clean", BuildDate:"2021-04-08T16:31:21Z", GoVersion:"go1.16.1", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.3", GitCommit:"ca643a4d1f7bfe34773c74f79527be4afd95bf39", GitTreeState:"clean", BuildDate:"2021-07-15T20:59:07Z", GoVersion:"go1.16.6", Compiler:"gc", Platform:"linux/amd64"}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions