1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

wsl2上のUbuntuで、接続が切れる問題の調査

1
Posted at

発生した問題

  • windowでUbuntuを使って開発をしていたが、接続が切れてしまう

    • vsCodeでファイルが読み込めなくなる
    • Ubuntuのコマンドに以下のエラー
    仮想マシンまたはコンテナーからの応答が受信されなかったため、操作がタイムアウトしました。
    エラー コード: Wsl/Service/HCS_E_CONNECTION_TIMEOUT
    Press any key to continue...
    

試したこと

powershellで以下のコマンドを実行すると一時的に治るが、しばらくすると再発する。

wsl --shutdown

恒久対応

  1. C:\Users\ユーザー名配下に、.wslcongigを作成

  2. 以下の記述

    [wsl2]
    memory=8GB # PCのスペックに応じて、搭載メモリの半分以下くらい
    processors=4
    
  3. powershellでwsl --shutdownを実行

これで再発することは無くなった!

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?