title: Flink Savepoints akka.pattern.AskTimeoutException: Ask timed out on [Actor[akka://flink/user/jobmanager_1]
body: <p>While running Flink(1.6.0) datastream job with RocksDB as backend storage and HDFS as storage for checkpoints, I've encounter <code>akka.pattern.AskTimeoutException</code> while trying to do savepoint via cli.</p>
  
  <pre class="lang-java prettyprint-override"><code>org.apache.flink.util.FlinkException: Triggering a savepoint for the job e569cf53baecae9cb4fa794d590d670f failed.
    at org.apache.flink.client.cli.CliFrontend.triggerSavepoint(CliFrontend.java:714)
    at org.apache.flink.client.cli.CliFrontend.lambda$savepoint$9(CliFrontend.java:692)
    at org.apache.flink.client.cli.CliFrontend.runClusterAction(CliFrontend.java:979)
    at org.apache.flink.client.cli.CliFrontend.savepoint(CliFrontend.java:689)
    at org.apache.flink.client.cli.CliFrontend.parseParameters(CliFrontend.java:1059)
    at org.apache.flink.client.cli.CliFrontend.lambda$main$11(CliFrontend.java:1120)
    at org.apache.flink.runtime.security.NoOpSecurityContext.runSecured(NoOpSecurityContext.java:30)
    at org.apache.flink.client.cli.CliFrontend.main(CliFrontend.java:1120)
  Caused by: java.util.concurrent.CompletionException: akka.pattern.AskTimeoutException: Ask timed out on [Actor[akka://flink/user/jobmanager_15#-1160136947]] after [60000 ms]. Sender[null] sent message of type "org.apache.flink.runtime.rpc.messages.LocalFencedMessage".
    at java.util.concurrent.CompletableFuture.encodeRelay(CompletableFuture.java:326)
    at java.util.concurrent.CompletableFuture.completeRelay(CompletableFuture.java:338)
    at java.util.concurrent.CompletableFuture.uniRelay(CompletableFuture.java:911)
    at java.util.concurrent.CompletableFuture$UniRelay.tryFire(CompletableFuture.java:899)
    at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
    at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977)
    at org.apache.flink.runtime.concurrent.FutureUtils$1.onComplete(FutureUtils.java:770)
    at akka.dispatch.OnComplete.internal(Future.scala:258)
    at akka.dispatch.OnComplete.internal(Future.scala:256)
    at akka.dispatch.japi$CallbackBridge.apply(Future.scala:186)
    at akka.dispatch.japi$CallbackBridge.apply(Future.scala:183)
    at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:36)
    at org.apache.flink.runtime.concurrent.Executors$DirectExecutionContext.execute(Executors.java:83)
    at scala.concurrent.impl.CallbackRunnable.executeWithValue(Promise.scala:44)
    at scala.concurrent.impl.Promise$DefaultPromise.tryComplete(Promise.scala:252)
    at akka.pattern.PromiseActorRef$$anonfun$1.apply$mcV$sp(AskSupport.scala:603)
    at akka.actor.Scheduler$$anon$4.run(Scheduler.scala:126)
    at scala.concurrent.Future$InternalCallbackExecutor$.unbatchedExecute(Future.scala:601)
    at scala.concurrent.BatchingExecutor$class.execute(BatchingExecutor.scala:109)
    at scala.concurrent.Future$InternalCallbackExecutor$.execute(Future.scala:599)
    at akka.actor.LightArrayRevolverScheduler$TaskHolder.executeTask(LightArrayRevolverScheduler.scala:329)
    at akka.actor.LightArrayRevolverScheduler$$anon$4.executeBucket$1(LightArrayRevolverScheduler.scala:280)
    at akka.actor.LightArrayRevolverScheduler$$anon$4.nextTick(LightArrayRevolverScheduler.scala:284)
    at akka.actor.LightArrayRevolverScheduler$$anon$4.run(LightArrayRevolverScheduler.scala:236)
    at java.lang.Thread.run(Thread.java:748)
  Caused by: akka.pattern.AskTimeoutException: Ask timed out on [Actor[akka://flink/user/jobmanager_15#-1160136947]] after [60000 ms]. Sender[null] sent message of type "org.apache.flink.runtime.rpc.messages.LocalFencedMessage".
    at akka.pattern.PromiseActorRef$$anonfun$1.apply$mcV$sp(AskSupport.scala:604)
    ... 9 more
  </code></pre>
  
  <p>I've increased askTimeout from 10s to 60s but I didn't help. Also, after exception, I see that flink created savepoint file of 2.4 G on HDFS.</p>
  
  <p>I'm wondering what to do in this case? Increasing timeout to the high value doesn't look a viable approach once the state starts growing further.</p>
  
  <p><strong>UPDATE</strong>:
  I have the feeling it actually a bug with CLI or JobManager, as I see in the log that task manager is able to do all savepoints under couple seconds.
  Trunucated task manager log:
  <a href="https://pastebin.com/fvu4uhAf" rel="nofollow noreferrer">https://pastebin.com/fvu4uhAf</a>  </p>