Skip to content

[bitnami/postgresql-ha] Unable to set postgresql max_connections higher than 500 #33528

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Linuxine opened this issue May 7, 2025 · 0 comments
Assignees
Labels
in-progress postgresql-ha tech-issues The user has a technical issue about an application

Comments

@Linuxine
Copy link

Linuxine commented May 7, 2025

Name and Version

bitnami/postgresql-ha-15.1.0

What architecture are you using?

None

What steps will reproduce the bug?

Hi,

When installing the postgresql-ha chart, I cannot set the parameter max_connections for Postgres above 500. I have succesfully set the environnement variable $POSTGRESQL_MAX_CONNECTIONS to 1024 in the pods, I can see it connected to a pod or in my pod description:

POSTGRESQL_MAX_CONNECTIONS:              1024

The value is also present in the configuration file used by postgres:

/$ grep max_connections /opt/bitnami/postgresql/conf/postgresql.conf
max_connections = '1024'

postgres=# show config_file;
                 config_file
----------------------------------------------
 /opt/bitnami/postgresql/conf/postgresql.conf

But when checking what is the applied value in postgres, I get 500:

postgres=# show max_connections;
 max_connections
-----------------
 500
(1 row)

The only place where I find this value is in the file /bitnami/postgresql/data/postgresql.auto.conf which contains:

I have no name!@pg-ha-postgresql-ha-postgresql-1:/bitnami/postgresql/data$ cat postgresql.auto.conf
# Do not edit this file manually!
# It will be overwritten by the ALTER SYSTEM command.
max_connections = '500'

So I guess an ALTER SYSTEM command must be performed at the init of Posgres to set this variable ? But I have inspected the image scripts, the helm chart, I am not able to determine where this value comes from.

Are you using any custom parameters or values?

My value file for the installation is a followed:

postgresql:
  replicaCount: 3
  username: xxx
  existingSecret: my-xx
  repmgrUsername: repmgr
  resources:
    requests:
      cpu: 500m
      memory: 512Mi
      ephemeral-storage: 50Mi
  extendedConf: |-
    huge_pages = off
  maxConnections: 1024

volumePermissions:
  enabled: true

pgpool:
  replicaCount: 3
  adminUsername: admin
  existingSecret: xxx
  resources:
    requests:
      cpu: 500m
      memory: 512Mi
      ephemeral-storage: 50Mi

persistence:
  enabled: true

What is the expected behavior?

I was expected my max_connections setting to be set to 1024.

What do you see instead?

The max_connections setting is set to 500, and I have no idea where this value comes from

Additional information

Any help would be greatly appreciated ! Thanks a lot for your time !

@Linuxine Linuxine added the tech-issues The user has a technical issue about an application label May 7, 2025
@github-actions github-actions bot added the triage Triage is needed label May 7, 2025
@github-actions github-actions bot removed the triage Triage is needed label May 9, 2025
@github-actions github-actions bot assigned juan131 and unassigned carrodher May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in-progress postgresql-ha tech-issues The user has a technical issue about an application
Projects
None yet
Development

No branches or pull requests

3 participants