Skip to content

Commit

Permalink
Extend ConcurrentHousekeeping instance timeout
Browse files Browse the repository at this point in the history
There was an exception
Exception in thread "main" java.util.concurrent.TimeoutException
        at java.base/java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1886)
        at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2021)
        at com.atlassian.performance.tools.concurrency.api.GracefulTerminationKt.finishBy(GracefulTermination.kt:22)
        at com.atlassian.performance.tools.aws.api.housekeeping.ConcurrentHousekeeping.waitUntilReleased(ConcurrentHousekeeping.kt:50)
        at com.atlassian.performance.tools.aws.api.housekeeping.ConcurrentHousekeeping.access$waitUntilReleased(ConcurrentHousekeeping.kt:13)
        at com.atlassian.performance.tools.aws.api.housekeeping.ConcurrentHousekeeping$cleanLeftovers$1.accept(ConcurrentHousekeeping.kt:22)
        at com.atlassian.performance.tools.aws.api.housekeeping.ConcurrentHousekeeping$cleanLeftovers$1.accept(ConcurrentHousekeeping.kt:13)
        at com.atlassian.performance.tools.aws.Ec2$consumeExpiredInstances$1.invoke(Ec2.kt:29)
        at com.atlassian.performance.tools.aws.Ec2$consumeExpiredInstances$1.invoke(Ec2.kt:12)
        at com.atlassian.performance.tools.aws.TokenScrollingEc2.scrollThroughInstances(TokenScrollingEc2.kt:30)
        at com.atlassian.performance.tools.aws.Ec2.consumeExpiredInstances(Ec2.kt:24)
        at com.atlassian.performance.tools.aws.api.housekeeping.ConcurrentHousekeeping.cleanLeftovers(ConcurrentHousekeeping.kt:21)
        at com.atlassian.performance.tools.aws.api.Aws.cleanLeftovers(Aws.kt:295)
        at com.atlassian.performance.tools.aws.client.command.CleanExpired.perform(CleanExpired.kt:14)
        at com.atlassian.performance.tools.aws.client.command.CleanExpiredMainKt.main(CleanExpiredMain.kt:10)
        at com.atlassian.performance.tools.aws.client.command.CleanExpiredMainKt.main(CleanExpiredMain.kt)
  • Loading branch information
mgrzaslewicz authored and dagguh committed Jan 23, 2024
1 parent 831e7bb commit b70a562
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Dropping a requirement of a major version of a dependency is a new contract.
### Fixed
- Tag security groups atomically when created.
- Respect AWS request size limits in `TerminationBatchingEc2` and `TerminationPollingEc2`.
- Extend `ConcurrentHousekeeping` instance timeout.

## [1.14.0] - 2024-01-04
[1.14.0]: https://github.com/atlassian-labs/aws-resources/compare/release-1.13.0...release-1.14.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class ConcurrentHousekeeping(

private fun waitUntilReleased(
resources: List<Resource>,
timeout: Duration = Duration.ofSeconds(15)
timeout: Duration
) {
val deadline = now() + timeout
resources
Expand All @@ -65,7 +65,7 @@ class ConcurrentHousekeeping(

class Builder {
private var stackTimeout: Duration = Duration.ofMinutes(5)
private var instanceTimeout: Duration = Duration.ofMinutes(4)
private var instanceTimeout: Duration = Duration.ofMinutes(8)
private var amiTimeout: Duration = Duration.ofMinutes(2)

fun stackTimeout(stackTimeout: Duration) = apply { this.stackTimeout = stackTimeout }
Expand Down

0 comments on commit b70a562

Please sign in to comment.