Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

LocalCluster fails to spawn requested number of workers (capped at 5 workers on Windows)

オープン
#9,134 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
42/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python

調査の方向性

まず、指定されたワーカー数で、提供されている LocalCluster の再現手順を Windows 上で実行し、次に LocalCluster のワーカー起動パスをたどって、5 ワーカーの上限がどこで導入されているかを突き止めます。7、10、20、50 ワーカーのリクエストで要求した数が登録され、既存の 5 ワーカーのケースが引き続き正しく動作すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

needs info
Description

When creating a LocalCluster with n_workers > 5, the cluster consistently only spawns exactly 5 workers, regardless of the requested number. This appears to be a hard limit on Windows systems.

Environment
  • OS: Windows
  • Python version: (output from python --version)
  • Dask version: 2025.10.0
  • Distributed version: 2025.10.0
  • Installation method: conda/miniforge
Minimal Reproducible Example
from dask.distributed import LocalCluster, Client
import time

if __name__ == '__main__':
    print('=== TESTING DASK LOCAL CLUSTER WITHOUT PLUGINS ===')
    
    for n_workers in [5, 7, 10, 20, 50]:
        print(f'\n--- Testing {n_workers} workers ---')
        
        cluster = LocalCluster(
            n_workers=n_workers,
            threads_per_worker=1,
            processes=True,
            memory_limit='500MB',
            silence_logs=True
        )
        client = Client(cluster)
        
        # Wait for workers to connect
        time.sleep(5)
        
        # Check how many workers registered
        info = client.scheduler_info()
        num_connected = len(info['workers'])
        print(f'Requested: {n_workers}, Connected: {num_connected}')
        
        client.close()
        cluster.close()
        time.sleep(2)
    
    print('\n=== TEST COMPLETE ===')
Expected Behavior

The LocalCluster should spawn the number of workers specified by the n_workers parameter. For example:

n_workers=7 should create 7 workers
n_workers=10 should create 10 workers
n_workers=50 should create 50 workers

Actual Behavior

Regardless of the n_workers parameter, exactly 5 workers are created and connected:
=== TESTING DASK LOCAL CLUSTER WITHOUT PLUGINS ===

--- Testing 5 workers ---
Requested: 5, Connected: 5

--- Testing 7 workers ---
Requested: 7, Connected: 5

--- Testing 10 workers ---
Requested: 10, Connected: 5

--- Testing 20 workers ---
Requested: 20, Connected: 5

--- Testing 50 workers ---
Requested: 50, Connected: 5

=== TEST COMPLETE ===

主要言語
Python
スター
1.7k
フォーク
778
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

dask/distributed のほかの issue

dask/distributed の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。