Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web directory in wsl2 soft connects to win10 web directory, accessible but very laggy response【请求帮助!!!3Q】 #11576

Closed
stuffren opened this issue May 11, 2024 · 4 comments

Comments

@stuffren
Copy link

I have set up a LAMP environment in WSL2:
WSL2 ---version--- Ubuntu 22.04.4 LTS
MySQL ---version--- 8.0.36
PHP ---version--- 8.1.2
Apache ---version--- 2.4.52 (Ubuntu)

My website's root directory is located in var/www/ucoredata in WSL2, and I have created a symbolic link between this directory and the local D:\formalpro\ucoredata directory in Windows 10.
Currently, I can use an editor to directly modify and edit the PHP source code in the D:\formalpro\ucoredata directory on Windows 10, and the changes will be successfully mapped back to the /var/www/ucoredata root directory in WSL2.
I have configured a virtual domain, ucoredata.com, in the hosts file of Windows 10, and I can successfully access the website locally through this virtual domain.

My goal is to develop and test PHP programs (websites) directly on Windows 10 without using remote tools like WSL2 remote in VS Code to open the website's source code in WSL2. Although I have achieved this goal, there are two issues:

Issue 1: Although the website can be accessed successfully, I have noticed that the response time is very slow during operation. What are the typical causes of this? Is it due to the cross-filesystem setup? The use of a virtual domain? Or some other reasons?

Issue 2: What are the common approaches to resolve the issue of slow response time?

Looking forward to your help and answers, thanks in advance!!

Copy link

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The scipt will output the path of the log file once done.

Once completed please upload the output files to this Github issue.

Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@stuffren
Copy link
Author

/question
There's no need to collect WSL logs because
github-actions bot autoresponders to similar questions - #6366 has solved my problem. Thanks!

Copy link

Diagnostic information
Found '/question', adding tag 'question'

@OneBlue
Copy link
Collaborator

OneBlue commented May 13, 2024

Closing since the issue is solved;

@OneBlue OneBlue closed this as completed May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants