Skip to content

Database Automatically restarted due to Parameter change

0

We got paged across multiple different AWS accounts because our databases were restarted at the same time, unprompted. We saw the following messages for all the databases. We don't see any changes manually which caused this parameter to be changed from checking our cloudtrail history, we are wondering if you would have more information on why this restart and param change occurred, as this caused widespread downtime in our services. Specifically, the databases impacted were: rbac-encrypted-us-west-2 and cc-policy-service-db-us-west-2 and these same databases were affected in other AWS accounts as well (devel and staging).

The parameter max_wal_senders was set to a value incompatible with replication. It has been adjusted from 10 to 35. July 01, 2025, 22:17 (UTC-07:00) DB instance shutdown July 01, 2025, 22:17 (UTC-07:00) The parameter max_wal_senders was set to a value incompatible with replication. It has been adjusted from 10 to 35.

3 Answers
1

If your RDS or Aurora PostgreSQL cluster is replication-enabled (e.g., cross-region read replica or logical replication), AWS automatically enforces a minimum value for max_wal_senders that supports the replication configuration. If your parameter group sets this to an incompatible value (like 10), AWS will override it to a safe minimum (e.g., 35) and restart the DB without a manual change or CloudTrail event, as it's classified under automated system updates.

This is expected behavior and has been observed across accounts when new replication features are enabled or patched.

Try with the bewlo to Fix: To prevent automatic restarts in the future, do the following: Attach a custom DB parameter group with max_wal_senders set to the correct replication-compatible value (≥35). Apply it explicitly to all replicated clusters. Avoid using default parameter groups, which AWS can override silently during updates.

answered 9 months ago
0

The max_wal_senders parameter is setup in Primary or a Master server and specifies the maximum number of concurrent connections from standby or replica servers to enable stream of WAL segments. Any abrupt streaming client disconnection might leave an orphaned connection slot behind until a timeout is reached, so this parameter should be set to a slightly higher value than the maximum number of expected clients so disconnected clients can immediately reconnect.

[+] https://www.postgresql.org/docs/11/runtime-config-replication.html

Now, coming to the event that you are referring to, please be informed that this is a known message that is observed when an RDS PostgreSQL instance is restarted. Though the message appears as an error, this can be safely disregarded as it is harmless and doesn't affect your DB Instance or it's performance. If the value of max_wal_senders is not at least equal to max_replication_slots, the max_wal_senders is automatically adjusted to match the value equal to that of max_replication_slots as per the design.

This is also done to support the Cross Region Read Replication which uses replication slot instead of native streaming replication. Please check below link for your reference:

[+] Working with PostgreSQL read replicas in Amazon RDS - Read replica configuration with PostgreSQL - https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PostgreSQL.Replication.ReadReplicas.html#USER_PostgreSQL.Replication.ReadReplicas.Configuration

I would like to reaffirm that this is an expected behavior and does not affect your DB instance in any way. This can be safely ignored as this behavior is as per the design.

AWS
SUPPORT ENGINEER
answered 9 months ago
  • Hi, can you clarify if that means the DB instance was restarted due to this configuration or something else?

0

Based on the information provided, it appears your databases were automatically restarted due to a parameter change that AWS determined was necessary for proper replication functionality.

The specific parameter that was modified was max_wal_senders, which was increased from 10 to 35. This parameter is related to PostgreSQL's Write-Ahead Logging (WAL) system and determines how many simultaneous replication connections can be active.

There are several possible explanations for why this automatic restart occurred:

  1. AWS may have determined that your current setting was insufficient for proper replication functionality and automatically adjusted it as part of a maintenance operation.

  2. This could be related to an automatic minor version upgrade of your database engine, where AWS determined that the previous parameter value was incompatible with the new version's replication requirements.

  3. AWS occasionally performs mandatory updates to ensure database stability and performance, which can include parameter adjustments that require restarts.

When parameter changes like this occur, especially for static parameters, the database instance must be rebooted for the changes to take effect. In your case, the parameter adjustment triggered an automatic restart across multiple environments (development, staging, production), which explains the widespread impact.

To prevent unexpected restarts in the future, you might want to:

answered 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.