如何解决达标任务失败,因为它们尝试连接超时
我正在尝试对xarray数据执行一些计算。数据具有纬度,经度和时间坐标,以及多个数据变量。
我的计算是在单个时间步上执行的。为了尝试与此并列,我正在使用dask分布式客户端。
我正在这样的单台计算机上运行客户端:
client = Client(processes=False)
dask.config.set({'distributed.comm.timeouts.connect': '20s'})
由于超时问题,我增加了配置超时时间。 (基于此评论:Long running workers blocking GIL timeout errors)
我的某些任务(在单个时间步上调用同一功能)执行得很好,而对于其他任务,我会收到如下警告:
distributed.worker - WARNING - Compute Failed
Function: slom_per_timeslice
args: ((numpy.datetime64('1987-02-06T10:00:00.000000000'),<xarray.Dataset>
Dimensions: (lat: 10,lon: 13)
Coordinates:
* lat (lat) float64 36.88 40.88 44.88 48.88 ... 64.88 68.88 72.88
* lon (lon) float64 -12.88 -8.875 -4.875 -0.875 ... 27.12 31.12 35.12
time datetime64[ns] 1987-02-06T10:00:00
Data variables:
t2m (lat,lon) float32 dask.array<chunksize=(10,13),meta=np.ndarray>
solarCF (lat,meta=np.ndarray>
windCF_off (lat,meta=np.ndarray>
windCF_on (lat,meta=np.ndarray>))
kwargs: {}
Exception: OSError("Timed out trying to connect to 'inproc://192.168.xxx.xx/5050/1' after 10 s: Timed out trying to connect to 'inproc://192.168.xxx.xx/5050/1' after 10 s: connect() didn't finish in time")
inproc指向的地址是调度程序的地址:
Scheduler: inproc://192.168.xxx.xx/5050/1
最终它使脚本崩溃,并显示以下错误:
OSError: Timed out trying to connect to 'inproc://192.168.xxx.xx/5050/1' after 10 s: connect() didn't finish in time
请注意,这些超时是在10s之后超时的,而不是我添加到配置中的20s。 但是,超时时间似乎确实已更改,因为这是我在dask仪表板中单击工作日志时遇到的错误(我收到500:内部服务器错误):
distributed.utils - ERROR - Timed out trying to connect to 'inproc://192.168.xxx.xx/5050/3' after 20 s: Timed out trying to connect to 'inproc://192.168.xxx.xx/5050/3' after 20 s: connect() didn't finish in time
我已经在研究小组的pc(发生上述错误的地方)和我的个人桌面上运行了代码。相同的代码可以在我的个人桌面上正常运行。
该代码在同一环境中运行,唯一的区别是我运行Windows和研究小组Ubuntu。
我运行了client.get_versions(check=True)
命令,它输出了一个use软件包的字典:
{'scheduler': {'host': {'python': '3.8.5.final.0','python-bits': 64,'OS': 'Linux','OS-release': '4.15.0-121-generic','machine': 'x86_64','processor': 'x86_64','byteorder': 'little','LC_ALL': 'None','LANG': 'en_GB.UTF-8'},'packages': {'python': '3.8.5.final.0','dask': '2.26.0','distributed': '2.26.0','msgpack': '1.0.0','cloudpickle': '1.6.0','tornado': '6.0.4','toolz': '0.10.0','numpy': '1.19.1','lz4': None,'blosc': None}},'workers': {'inproc://192.168.178.44/5050/3': {'host': {'python': '3.8.5.final.0','blosc': None}}},'client': {'host': {'python': '3.8.5.final.0','blosc': None}}}
(这些匹配项与台式机和研究小组计算机的操作系统不同)
是什么导致我的某些任务失败?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。