As discussed on https://github.com/Microsoft/WSL/issues/849 by user imkimchi the steps for solving this issue are:
- Run windows + R
- type SystemPropertiesAdvanced
- click settings in performance group
- In advanced tab, click Change under Virtual Memory and deselect the automatically manage paging file size for all drives
- Select custom size and enter 800 for initial size, 1024 for maximum size.
- Apply changes and restart.