DAP - ' FATAL: number of requested standby connections exceeds max_wal_senders' when configuring follower/standby

DAP - ' FATAL: number of requested standby connections exceeds max_wal_senders' when configuring follower/standby

112
Created On 11/10/26 10:54 AM - Last Modified 11/10/26 15:56 PM


Symptom


DAP standby or follower node fails to configure. The following appears in the log:

pg_basebackup: could not connect to server: FATAL: number of requested standby connections exceeds max_wal_senders (currently <number>)

 



Environment


11.1;11;11.2;11.3;11.4;11.5;11.6;11.7;12.0

DAP version 11 and higher



Cause


This error indicates that Postgres does not have enough available connections for replication to occur. That means the Standby/Follower node fails to configure successfully.

There are two possible causes:

  1. Prior to v11.4, there was a bug in the Seed Service endpoint that did not close database connections. This would cause the connection pool to become exhausted.

  2. By default, DAP is configured for 16 total of standbys and followers. If another standby or master is connected beyond 16, the user will see the above error.



Resolution


a. Upgrade to a DAP version >= 11.4

b. Master and Standby nodes will need to be updated to support more than 16 standbys and/or followers. 

In order to upgrade to 11.4 or any latest version due to above stated issue kindly perform below steps

1. Create a json file to load in configuration 

    i. touch conjur.json
    ii. vi conjur.json 



 Add in the desired values (think expansion and design considerations of environment):

{
  "postgresql": {
    "config": {
      "max_connections": 155,
      "max_wal_senders": 55
    }
  }
}



 
2. Initiate Backup/Restore process before removing the existing containers

The steps to perform the backup can be found on the online documentation link as given below – 
https://docs.cyberark.com/Product-Doc/OnlineHelp/AAM-DAP/Latest/en/Content/Deployment/HighAvailability/backup-restore.htm

3. Rebuild the DAP Environment

i. Rebuild container

ii. Along with loading the Backup into new container, load conjur.json as below

  • docker cp conjur.json dap:/opt/conjur/backup

     

iii. Unpack and Restore the backup and start the replication

iv. Validate the value matches your conjur.json

  • Docker exec -it <container_name> bash 
  • cat /etc/postgresql/9.4/main/postgresql.conf | grep -i “max_wal_senders”

4. Once verified, proceed with rest of the steps of building DAP cluster -  Reseed standby members



Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj00000012ZFCAY&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail