You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Scheduler closing with connected client due to timeout #3265
Using KubeCluster(deploy_mode='remote'), the scheduler_timeout kwarg seems to define the amount of time following any active requests from the client before which the scheduler closes.
The scheduler will close (and the client will close) 10s after that call to submit. If I keep making calls to submit, however, then the scheduler and client will keep staying alive.
If I understand this kwarg correctly, it should not have this behavior (and, indeed it doesn't with a LocalCluster). My expected behavior is that unless the client dies (e.g. from restarting the python kernel), it would still be connected to the scheduler and this timeout should not trigger.
I would expect the timeout to only happen after all clients disconnect.
It looks like the KubeCluster scheduler_timeout keyword points to the idle_timeout option in the dask.distributed.Scheduler. This option is indeed intended to close the scheduler if no one submits any work, even if there are connected clients.
scheduler_timeout: str
The scheduler task will exit after this amount of time
if there are no clients connected.
Defaults to ``5 minutes``.
--idle-timeout TEXT Time of inactivity after which to kill the
scheduler
So it seems like there is some disagreement between the KubeCluster scheduler_timeout option and the Scheduler idle_timeout option. I think that we should keep the meaning of idle-timeout on the scheduler. I'm not sure what is best to do with KubeCluster. Probably there should be an easy way to pass these things through. It seems like KubeCluster might also want the scheduler_timeout option, which, if important, maybe we should push upstream as well (I don't know though, I haven't needed this in particular myself).
thanks both! Yeah as the user @jacobtomlinson was referring to, I was definitely mixing these two options up. Agreed that it probably makes sense to support both, and definitely to allow for a null idle-timeout value.
Activity
mrocklin commentedon Nov 25, 2019
It looks like the KubeCluster scheduler_timeout keyword points to the
idle_timeoutoption in the dask.distributed.Scheduler. This option is indeed intended to close the scheduler if no one submits any work, even if there are connected clients.So it seems like there is some disagreement between the KubeCluster scheduler_timeout option and the Scheduler idle_timeout option. I think that we should keep the meaning of idle-timeout on the scheduler. I'm not sure what is best to do with KubeCluster. Probably there should be an easy way to pass these things through. It seems like KubeCluster might also want the scheduler_timeout option, which, if important, maybe we should push upstream as well (I don't know though, I haven't needed this in particular myself).
jacobtomlinson commentedon Nov 25, 2019
Ah ok! I think the user here is looking for
scheduler_timeout. This is my misunderstanding in the dask-kubernetes implementation.I think the best course of action would be to implement support for both in dask-kubernetes.
bolliger32 commentedon Nov 25, 2019
thanks both! Yeah as the user @jacobtomlinson was referring to, I was definitely mixing these two options up. Agreed that it probably makes sense to support both, and definitely to allow for a null
idle-timeoutvalue.