From 9f0f45e2e5f71596db632a7489c27a91a8b5d65e Mon Sep 17 00:00:00 2001 From: Andrew Zimmer Date: Tue, 28 May 2024 12:14:50 -0400 Subject: [PATCH] PEPPER-1413 delay the shutdown to give the db more time (#2876) PEPPER-1413 delay the shutdown to give the db more time to clear connections ahead of starting up replacement instance. --- .../org/broadinstitute/ddp/appengine/spark/SparkBootUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pepper-apis/ddp-common/src/main/java/org/broadinstitute/ddp/appengine/spark/SparkBootUtil.java b/pepper-apis/ddp-common/src/main/java/org/broadinstitute/ddp/appengine/spark/SparkBootUtil.java index 2f745001ba..624f8d1fe3 100644 --- a/pepper-apis/ddp-common/src/main/java/org/broadinstitute/ddp/appengine/spark/SparkBootUtil.java +++ b/pepper-apis/ddp-common/src/main/java/org/broadinstitute/ddp/appengine/spark/SparkBootUtil.java @@ -78,7 +78,7 @@ public static void startSparkServer(AppEngineShutdown stopRouteCallback, Config // as a failure if (numShutdownAttempts == 0) { final ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(1); - executor.schedule(() -> stopRouteCallback.onAhStop(), 500, TimeUnit.MILLISECONDS); + executor.schedule(() -> stopRouteCallback.onAhStop(), 5, TimeUnit.SECONDS); } else { log.info("Ignoring shutdown attempt {}", numShutdownAttempts); }