Skip to content

Scheduler closing with connected client due to timeout #3265

Closed

Description

@jacobtomlinson

Copied from dask/dask-kubernetes#206

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.

For example, if I call:

cluster = KubeCluster(deploy_mode='remote', scheduler_timeout='10s')
client = Client(cluster)
future = client.submit(some_function,some_args)

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.

Activity

  1. mrocklin commented on Nov 25, 2019

    @mrocklin
    Member

    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).

  2. jacobtomlinson commented on Nov 25, 2019

    @jacobtomlinson
    MemberAuthor

    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.

  3. bolliger32 commented on Nov 25, 2019

    @bolliger32

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions