Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: extend connection timeout #12

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

blimmer
Copy link
Contributor

@blimmer blimmer commented Aug 28, 2023

Fixes #7

Agree with @moltar - the timeout is very very low and can cause timeout exceptions that could be avoided by just bumping the time.

Since the lambda has 300 seconds to run, a maximum of 30 seconds to connect seems reasonable.

@berenddeboer
Copy link
Owner

Apologies, only saw this now. The problem I have with this is if the database is not accessible, it'll wait 30seconds. Also 2s seems pretty reasonable for a database? I would find it odd it cannot connect that quickly. I think I rather have it as an option if this is a problem for people.

@blimmer
Copy link
Contributor Author

blimmer commented May 11, 2024

The problem is with the initial creation of the database. I can't use this construct because it does not wait long enough for the database to be live, then fails the whole stack.

Perhaps it needs to have additional CFN dependencies?

@berenddeboer
Copy link
Owner

Ah, so not with resume right? It depends on the rds construct. So is this a v2 serverless? Happy to support this a bit better, but possibly via an option. So if you can help me with the exact conditions? Then I can see if I can get it right or even repeat it.

@berenddeboer berenddeboer reopened this May 13, 2024
@blimmer
Copy link
Contributor Author

blimmer commented Jun 2, 2024

I tried using this pacakge with several standard RDS Aurora Postgres clusters, only to have them rolled back because of timeouts from this custom resource.

I think you could reproduce this issue on just a standard rds aurora cluster, because they can take quite a while (~10 minutes) to spin up.

@stephanpelikan
Copy link
Contributor

I have the same issue: I created a serverless PostgreSql which has to auto-pause after 5 mins: Current capacity: 0 capacity units.

Next I extended the stack to create a database but it fails due to timeout.

Regarding timeout: Even deleting the cluster took 1516 seconds. All the time the stack was waiting for the cluster to wake up and receive the 'delete' command. During this period in AWS console the cluster was still active and zero capacity.

@berenddeboer berenddeboer merged commit 276e3ee into berenddeboer:main Sep 11, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Timeout is very low
3 participants