Terraform: RDS creation often timing out

Created on 29 Jul 2015  ยท  7Comments  ยท  Source: hashicorp/terraform

I've been frequently hitting the 40 minute timeout for aws_db_instance creation lately. I would consider bumping this timeout up to 60+ minutes, or maybe reset the timeout counter back to zero it if the state changes at all.

Another related note is that terraform doesn't consider the resource tainted or anything if there's a timeout. Not sure if this is by design, but it saves me a lot of hassle right now because the DB does eventually get created.

bug provideaws thinking

Most helpful comment

Any progress on this one? Creating RDS instances from snapshots can take a while. Since hitting the timeout only happens for a very small set of actions I would love to see a parameter --timeout=true|false.

All 7 comments

Hey @thegedge โ€“ย thanks for writing in. I'm not sure how best to "solve" this. One idea would be a flag to allow you to simply not wait at all after we get the "creating" status (meaning everything thing we sent over validated and the creation process is underway). Another could be a user supplied int for the timeout.

maybe reset the timeout counter back to zero it if the state changes at all.

What state changes are you imagining here? From my experience it's simply in creating for that whole time, am I missing another step?

It usually goes creating --> modifying --> backing up, so for each of those transitions I was thinking we could reset the timeout counter. An integer flag would be great too, especially if .terraformrc supported setting flag defaults for the various commands.

I'm not really into the idea of not waiting because that requires me to go to the AWS console to know everything is completed (not a terrible thing, but it would be nice to avoid this). It also breaks some of our use cases where we use a local-exec provisioner to set up some database users and such.

creating --> modifying --> backing up

I just tried this out, and went from creating -> available. It's possbily my modifying step was too quick I suppose? The backing up step only happens if the user supplies a value for backup retention (I don't, in my tests..)

I'm not really into the idea of not waiting because that requires me to go to the AWS console

_Not waiting_ is probably not the best solution, but I thought I'd throw it out there...

I just tried this out, and went from creating -> available. It's possbily my modifying step was too quick I suppose?

Possibly. We have non-default parameter groups and multi AZ enabled, which seems to constitute some of the "modifying". Not sure of exactly what's happening during the "modifying" phase. The only thing I know is that RDS is painful :)

The simplest solution would definitely be to just have a configurable flag, and I'd be happy with that. Even more so if we could set this flag with a default value via .terraformrc.

I get plagued by that issue as well.

I never had that issue if I created a multi-AZ masters setup with slaves that had empty databases. That's very quick to do.

I walk into the time out issue when I create slaves from a multi AZ masters setup that have data in it. I'm guessing the snapshot restore + deploy is way over 40 mins. At least in my case.

Any progress on this one? Creating RDS instances from snapshots can take a while. Since hitting the timeout only happens for a very small set of actions I would love to see a parameter --timeout=true|false.

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings