Changing the "max_connections" and "max_wal_senders" for DAP containers
137
Created On 11/10/26 10:59 AM - Last Modified 11/10/26 16:00 PM
Symptom
In continuation to the article DAP - ' FATAL: number of requested standby connections exceeds max_wal_senders' when configuring follower/standby - sometimes the performed steps don't help to increase "max_connections" and "max_wal_senders"
Environment
12.4;12.5;12.6;12.7 Conjur Deployment Conjur
Cause
Environment configuration
Resolution
In order to get this fixed, do the next:
===Master/Leader===
1. Create a json file to load in configuration
===Master/Leader===
1. Create a json file to load in configuration
-
touch conjur.json
-
vi conjur.json
Add in the desired values (think expansion and design considerations of environment):
{
"postgresql": {
"config": {
"max_connections": 155,
"max_wal_senders": 55
}
}
}
Note-
{
"postgresql": {
"config": {
"max_connections": 155,
"max_wal_senders": 55
}
}
}
Note-
- To increase the number of follower/Standby’s, “max_wal_senders” is required to be updated if the limit is going to be below 80.
- Keeping it on the safer side "max_wal_senders" value can be increased until 75 before needing to increase the "max_connections" as well. Example:
"postgresql": {
"config": {
"max_wal_senders": 75
}
}
}
- As only the "max_wal_senders" will be updated, Only Master & standby conjur.json needs to be updated.
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 a new container, load conjur.json as below
-
docker cp conjur.json dap:/path/to/conjur/backup
iii. Unpack and Restore the backup and start the replication
"evoke restore --accept-eula" needs to have the added "-j" to parse the updates, so it should turn into:
-
evoke restore -j /path/to/conjur.json --accept-eula
===Standby(s)===
Should be inherited those values during deployment & configuring from the master/leader seed
===Follower(s)===
It looks like the follower startup needs to be rebuilt in a manifest because it isn't a configuration that is carried through the seed. To get this fixed out by replicating the start-follower.sh into the manifest, adding the config items there, and applying them, for instance:
i. manually create the new container(s) for the follower(s)
ii. copy the generated follower seed file and conjur.json inside this container(s)
iii. unpack the seed
-
evoke unpack seed /path/to/seed
iv. start the container with conjur.json
-
evoke configure follower -j /path/to/conjur.json
=== Validating 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”