valet-wsl icon indicating copy to clipboard operation
valet-wsl copied to clipboard

Bug: HTTP requests hang and page doesn't load

Open InToSSH opened this issue 4 years ago • 0 comments

Basic info

Windows 10 Build WSL Distro WSL Verson PHP Version Valet version
20H2 Ubuntu 20.04.1 1 7.4.12 1.0.6
  • [x] I've checked the issue queue and could not find anything similar to my bug.
  • [x] I'm on the latest version of valet-wsl (valet --version): <Valet-wsl-Version>
  • [x] I've run valet install after updating and before submitting my issue/feature.

What is the problem? I followed the guide, installed everything. The set up seems to be working, but I can get only about 1 of 5 requests in the browser to load, others seem to hang and eventually time out. Also checking the PHP log I get this line every second:

[16-Nov-2020 01:33:35] ERROR: failed to retrieve TCP_INFO for socket: Protocol not available (92)

What was supposed to happen? Page should load

What actually happened? Request hang up

How to reproduce this? Installed Ubuntu WSL. Followed the Valet-WSL guide. Ran valet install and then valet link in the project repo. Opened browser, tried to load the page. First one usually loads fine, other ones hang. Only after about five reloads the page actually loads up. When I tried the same setup with WSL 2 all is working just fine, however in WSL 2 there is a problem with slow FS speeds when project is stored on Windows FS.

What is the solution?

Sources This problem seems to be related to these issues: https://stackoverflow.com/questions/46286420/php7-0-fpm-extremly-slow-on-ubuntu-windows-subsystem-linux https://github.com/Microsoft/WSL/issues/2100 https://www.issacc.com/solution-to-nginx-php-fpm-issues-on-windows-subsystem-for-linux-wsl/ However I checked the valet settings and all seems to be set correctly.

InToSSH avatar Nov 16 '20 00:11 InToSSH