-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
I am running WSL2 on Windows 10. I have docker containers (not using docker desktop) running in it that I send HTTP requests to through an application on my host. One particular container is a database. At some point, the number of HTTP requests to localhost:DB_PORT becomes large and that's when something happens to WSL networking because from that point I am not able to resolve localhost anymore (i.e. I can't reach localhost:DB_PORT through the browser even though I could do so before). I get the following message in my browser: ERR_CONNECTION_RESET.
So that's my main symptom. Interestingly enough if I use the IP of my WSL distro and the same port number WSL_DISTRO_IP:DB_PORT, I am able to reach the DB page. So it's something about resolving localhost that breaks (I would think so)?
Every time this "crash" occurs, I see through dmesg in my WSL distro the following:
[ 2353.973370] WSL (159 - ) ERROR: UtilAcceptVsock:251: accept4 failed 24
[ 2353.973875] WSL (159) ERROR: No file descriptors available @localhost.cpp:49 (ListenThread)
I'm not sure how it's related to what I'm experiencing, but this always appears in dmesg the moment things break.
Once I run wsl --shutdown and then wsl to restart WSL, everything starts working again just fine.
I have been able to run my tests without any anti-viruses, firewalls interfering without producing a different result.