I am having issues with my job restarting all the ...
# troubleshooting
j
I am having issues with my job restarting all the time (I think upon getting scaled by the autoscaler). The exception history shows
Copy code
org.apache.flink.util.FlinkExpectedException: The TaskExecutor is shutting down.
	at org.apache.flink.runtime.taskexecutor.TaskExecutor.onStop(TaskExecutor.java:481)
	at org.apache.flink.runtime.rpc.RpcEndpoint.internalCallOnStop(RpcEndpoint.java:239)
	at org.apache.flink.runtime.rpc.pekko.PekkoRpcActor$StartedState.lambda$terminate$0(PekkoRpcActor.java:574)
	at org.apache.flink.runtime.concurrent.ClassLoadingUtils.runWithContextClassLoader(ClassLoadingUtils.java:83)
	at org.apache.flink.runtime.rpc.pekko.PekkoRpcActor$StartedState.terminate(PekkoRpcActor.java:573)
	at org.apache.flink.runtime.rpc.pekko.PekkoRpcActor.handleControlMessage(PekkoRpcActor.java:196)
	at org.apache.pekko.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:33)
	at org.apache.pekko.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:29)
	at scala.PartialFunction.applyOrElse(PartialFunction.scala:127)
	at scala.PartialFunction.applyOrElse$(PartialFunction.scala:126)
	at org.apache.pekko.japi.pf.UnitCaseStatement.applyOrElse(CaseStatements.scala:29)
	at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:175)
	at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:176)
	at org.apache.pekko.actor.Actor.aroundReceive(Actor.scala:547)
	at org.apache.pekko.actor.Actor.aroundReceive$(Actor.scala:545)
	at org.apache.pekko.actor.AbstractActor.aroundReceive(AbstractActor.scala:229)
	at org.apache.pekko.actor.ActorCell.receiveMessage(ActorCell.scala:590)
	at org.apache.pekko.actor.ActorCell.invoke(ActorCell.scala:557)
	at org.apache.pekko.dispatch.Mailbox.processMailbox(Mailbox.scala:280)
	at org.apache.pekko.dispatch.Mailbox.run(Mailbox.scala:241)
	at org.apache.pekko.dispatch.Mailbox.exec(Mailbox.scala:253)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Can someone guide me towards what issues I should be looking for / how I can figure out why this is happening?
r
Look both into the Jobmanager and Taskmanager logs
Somewhere in those logs there should be something indicated what is going on
j
I have tracked down two potential issues ... For one, we're using GCS as checkpoint storage, and we're getting a few 429s status codes.
Copy code
INFO: Encountered status code 429 when sending PUT request to URL 'https://storage.googleapis.com/upload/storage [...]
Delegating to response handler for possible retry. [CONTEXT ratelimit_period="10 SECONDS"
But since it says it's retrying, I am thinking that's not the issue.
However, I am also seeing this:
r
that last error is probably why it's killed
make sure to give flink enough disk space
and also to configure your deployment to allow Flink to use that disk space πŸ˜„
j
So the pod is evicted due to not having sufficient local ssd storage. We're using fine-grained resource slots. Is there a way to define how much it should request of a mounted volume?
So we have 2 local SSDs on a node, and then mount an empty volume to each pod
Copy code
volumeMounts:
          - mountPath: /state
            name: scratch-volume
r
yeah, so depending on your setup you can either directly request ephemeral storage or you have a volume mount with an ephemeral storage claim where one specifies how much storage one requests/needs
For security reasons I cant show you the config we are using on our side but it definitely is possible.
(I'm just a simple Flink user like you πŸ˜„ )
j
AH πŸ˜„ But somewhat more pro than me it seems πŸ˜„
r
@Janine Weber take a look here, that's pretty much what we are doing in our setup (though we use AWS in the background and not google)
βœ… 1
Be prepared to fiddle around with how much storage Flink needs. The stuff we do already needs more than 500 GB πŸ˜‚
j
Tell me about it. My application state is huge. 😬 Any chance if you know if I can define ephemeral-storage through slot groups?
e.g.
Copy code
SlotSharingGroup.newBuilder("group1").setExternalResource("ephemeral-storage", "124G")
or so
r
I don't know enough about these things sadly πŸ˜“
j
fair enough, but thanks a lot for your help πŸ™ I will go back to fiddling around with stuff then πŸ˜„
t
Hey Janine, Are you sure it is supported? It seems like Flink supports only GPU as external resource. you might need to create your own plugin to work with that storage. https://nightlies.apache.org/flink/flink-docs-release-1.18/docs/deployment/advanced/external_resources/#external-resource-framework btw, did you notice any improvement in performance while using multiple slot sharing groups?
j
you are right that I would have to create my own plugin for it. But after some reading and consideration, I realized it didnt make all that much sense either, and assigning ephemeral storage per task manager was fine. And yes, definitely saw a lot of performance improvements are creating operator specific slot sharing groups. Especially if you have large rocks DB states - tuning for large managed memory is a must. Plus there is the entire part of cost savings.
πŸ‘ 1