Skip to content

Aurora Postgres Writer stuck in insufficient-capacity

0

Aurora PostgreSQL cluster with only one instance failed to start this morning with insufficient-capacity. I now cannot stop it in order to try to restart. I receive the error Instance staging-db-one is not in available state. insufficient-capacity

Is there a way out of this without creating a new cluster+writer, and then renaming them to reuse the current cluster address?

asked 9 months ago338 views

3 Answers
0
Accepted Answer

Suggestion 1. from the automated response worked smoothly. The new instance was auto-promoted to writer in fact.

answered 9 months ago

0

When an Aurora PostgreSQL writer instance gets stuck in an "insufficient-capacity" state, it means AWS currently doesn't have enough available capacity to provision the requested instance type in that specific Availability Zone.

Since you're unable to stop or restart the instance, here are some approaches to resolve this issue:

  1. Try a different Availability Zone: You can create a new reader instance in a different AZ within the same region. Once the reader is operational, you can initiate a failover to promote this reader to become the writer. This effectively moves your writer instance to a different AZ where capacity is available.

  2. Use a different instance type: Consider modifying the instance to an equivalent instance type from another family that might have more available capacity, such as switching from an r8g to an r6g or r5 instance type.

  3. Wait and retry: Capacity issues sometimes resolve themselves as resources become available. You might want to try again after a few hours.

  4. Create a new reader and promote it: As you suggested, you could:

  • Create a new reader instance (which should automatically be placed in a different AZ)
  • Rename your existing writer instance
  • Promote the reader to become the writer
  • Delete the original writer instance that's stuck in insufficient-capacity

If you need to maintain the same cluster endpoint address, the approach of creating a new reader in a different AZ and promoting it to writer would be preferable to creating an entirely new cluster, as it preserves your existing cluster endpoint.

For critical production environments, you might also want to contact AWS Support for assistance, especially if you need expedited resolution.
Sources
Insufficient-capacity when trying to add a Reader to ap-southeast-2a Aurora Postgres of Size db.r8g.large | AWS re:Post
Aurora PostgreSQL Writer and Reader Region & AZ both shows as being at ap-southeast-2b. Is this an issue that has to be corrected? | AWS re:Post

answered 9 months ago

EXPERT

reviewed 9 months ago

0

Hello.

The cause of the error is insufficient capacity on the AWS side, as described in the following document.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Troubleshooting.html#CHAP_Troubleshooting.Capacity

The InsufficientDBInstanceCapacity error can be returned when you try to create, start, or modify a DB instance. It can also be returned when you try to restore a DB instance from a DB snapshot. When this error is returned, a common cause is that the specific DB instance class isn't available in the requested Availability Zone. You can try one of the following to solve the problem:

  • Retry the request with a different DB instance class.
  • Retry the request with a different Availability Zone.
  • Retry the request without specifying an explicit Availability Zone.

Can You add a read replica to an Aurora cluster?
If it is possible, I think the issue can be resolved by launching it in an Availability Zone other than the one currently used by the writer instance and failing over.

EXPERT

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.