gies0r
gies0r

Reputation: 5239

dask distributed: How to increase timeout for worker connections? connect() didn't finish in time

OSError: Timed out trying to connect to 'tcp://127.0.0.1:40475' after 10 s: Timed out trying to connect to 'tcp:// 8.56.11:40475' after 10 s: connect() didn't finish in time

Having some huge operations running, I would like to increase the timeout using the Convertion Tool. But I wonder, which configuration option is really used here?

I tried:

os.environ["DASK_DISTRIBUTED__COMM__TIMEOUTS__CONNECT"] = "33s"
os.environ["DASK_DISTRIBUTED__COMM__TIMEOUTS__TCP"] = "35s"
os.environ["DASK_DISTRIBUTED__DEPLOY__LOST_WORKER"] = "34s"

but no effect (still 10 seconds for the timeout.

Upvotes: 3

Views: 3868

Answers (3)

carusyte
carusyte

Reputation: 1749

Check these 2 settings per doc as of version 2024-12

distributed.comm.timeouts.connect  30s
distributed.comm.timeouts.tcp  30s

Upvotes: 0

distracted-biologist
distracted-biologist

Reputation: 808

From the dask docs: https://docs.dask.org/en/latest/configuration.html

The accepted answer is now out of date- while supported use of ~/.dask/config.yml is deprecated.

Upvotes: 2

gies0r
gies0r

Reputation: 5239

The answer is in ~/.dask/config.yaml:

# Communication options
connect-timeout: 10      # seconds delay before connecting fails
tcp-timeout: 30         # seconds delay before calling an unresponsive connection dead
default-scheme: tcp

Upvotes: 1

Related Questions