-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Symfony 3.3 unsusable with windows ubuntu bash #23202
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
Comments
app_dev.php is the front controller for web requests. What does bash have to do with it ? |
@Arvi89 I have no idea what your actual issue is, but it is worth pointing out that WSL (Windows Subsystem for Linux) is beta software. Use Docker, or better yet, install Ubuntu for real (and then use LXC). ;-) |
@stof Nothing, but I installed my sf project on Ubuntu Windows (also called bash on Ubuntu on Windows). @robfrawley Yeah I know, it's just weird how it suddenly doesn't work anymore (it does, but way too slow, and no error anywhere). Usually, I use Ubuntu for dev, but on my surface, I'll keep Windows ^^ |
Could be related to file IO. I'm running WSL as well for some fiddling at home, but I haven't been using 3.3 on here yet. I do know, that file IO is extremely slow on WSL. @javiereguiluz the reason it took long for me, was a container recompilation every request. However, this was roughly 7~10 seconds for a project with ~100 pages and 30 bundles or so. |
@Arvi89 can you please update to Symfony 3.3.4 (https://symfony.com/blog/symfony-3-3-4-released) and see if this has been fixed? Thanks! |
@javiereguiluz Same problem. I actually re-installed my surface completely (for other reasons ^^), and I still have issues with 3.3.4 It's just a clean install, symfony new test, in the home folder. Screenshot of the profiler: http://imgur.com/a/Cqsjr |
I've got the same problem with a fresh installation of WSL and symfony 3.3.4.
Second page hit is without error and the debug bar is shown. Screenshot of first hit with DevTools open Edit: |
Can you try the 3.4 branch? It contains some perf fixes that will be part of 3.3.5 |
More specifically, #23465 may solve this issue. |
I installed the latest version via composer but it seems like it didn't help.
My main problem with this is that it needs 54 secs until the error page is shown. |
Could any of you provide a Blackfire profile? |
Hi nicolas. i do not have a blackfire account. I try to install it but it ask to me a client-id. |
There are some instructions on the doc of blackfire.io about the installation process. You need to create an account of course, that's how you'll get all credentials. Please use the feedback form if you need more help. |
You can log in using GitHub/Google/Etc, and then just follow the instructions as outlined here: https://blackfire.io/docs/up-and-running/installation |
Ok i dit a test. I can see result on a URL. |
I can, here is the relevant excerpt, ping @lyrixx ;) |
Ok :) |
Can you comment the serve_log section in your config_dev file? same as these: |
before disabling and if you have |
ok, but I have to go I will try on my return as soon as possible. |
i did the test on 127.0.0.1:80 not on localhost. |
I mean on that config line in config_dev.yml, not the ip of the curl call :) |
No, @nicolas-grekas isn't talking about the URL you used to create the Blackfire profile; he's talking about editing your
See #22712 (comment) and symfony/symfony-standard#1077 for additional information about similar issues that have come up. Hopefully it's the same problem you are running into, as the fix is straightforward. |
Sorry for the curl call. :))) |
@nicolas-grekas Thank you for your answer i read the post link you give it to me. But i dont think its the same problem. These post refer for installations under window. I do not have any problem with xamp for example, Symfony default 3.3.5 page is generated in less than 200ms with xamp on my computer. In my case its only under ubuntu with windows substystem for linux, and i dont have this probleme with old and very fat symfony 2.8 project. The loading time is quite satisfactory for a development environment. But with symfony 3.3.5 its near than 20 secondes for loading a page. Its unusable. |
@Madden33 could you comment this block, refresh twice the page, and tell us how many time it took to be generated ? |
@lyrixx 51ms... no problem anymore with win sub syst for linux, if i comment this block. :) |
Maybe a php extension is missing on my installation to improve log performance? [Zend Modules] |
I don't know what is wrong here. Maybe there is a kind of firewall ? |
@lyrixx I have a fresh install on a unbuntu bash for windows too and had the same problem with 3.3.x, i had to rollback to 3.2 to have a decent loading time |
Thanks for your feedback. To all people landing here because Symfony 3.3 is slow on ubuntu bash for windows: You can simply disable the Monolog handler by commenting this code block in your application. there are no need to downgrade to symfony 3.2 ;) |
I installed a fresh version of symfony 3.3 and i also have the same exact problem. To fix this i had to do one of the following thing :
From that it appears that detecting a "Connexion refused" is very slow on ubuntu bash (so it's more a bug on this, or maybe PHP ?) I made a simple test : It show that it takes around 1sec to detect a Connexion Refused, and since the connection will have a false value it will retry to connect at the next log, so 24 calls to the logs will end up in a 24 sec of lag if there is no server. Would be a good thing to not retry connexion to the log server if not available after the first try ?. |
I guess that's a bug in WSL? Can you try if any combinasion of STREAM_CLIENT_CONNECT | STREAM_CLIENT_ASYNC_CONNECT | STREAM_CLIENT_PERSISTENT remove that 1s timeout? |
It was already those flags : STREAM_CLIENT_CONNECT | STREAM_CLIENT_ASYNC_CONNECT | STREAM_CLIENT_PERSISTENT = 7 And also try to remove some of the flags, same bugs happens |
@lyrixx Thank you, that helped. BTW, why does monolog impact performance so drastically? |
Because monolog try to connect to a server. And this server does not exist. PHP should timeout, but I don't know why, on ubuntu bash it does not work like it should be. I guess our best way here, it's to disable this feature on ubuntu bash as it does not work. What do you think @nicolas-grekas ? |
Or to not configure a server that should timeout by default? x) (why was it done like that??) |
Sorry, I did not understand. What do you mean ? |
You said that monolog tries to connect to a server that doesn't exist (because of configuration, right?). Why is it the case by default? Why not avoid that fact and let the user enable it? |
@Nek- Either it should be disabled by default or it should be present in the documentation. But I guess a doc line is better than disabling this feature. |
Where's the point in shipping a default configuration that does not work properly? If having a server available under that IP and port configuration is mandatory, this should be stated anywhere. If this server is purely optional (which makes more sense for me), this configuration should be commented out to give an example, but not slow down the default configuration |
Because you can not know if the server is enable before trying to connect it.
@NicoHaase There are none. That's exactly the point. That's why I would like to remove this feature on Ubuntu Bash. |
How would setting up the monolog server look like to work properly with symfony on windows subsystem? Might be worth mentioning! |
I'm closing here because it's been 8 months since the last comment and also because Symfony 3.3 is no longer maintained. If the error persists with a maintained version (2.8, 3.4, 4.0, 4.1 or masteR) please open a issue with the new details. Thanks! |
Hello,
Since I can use the bash ubuntu on windows, I have been using it instead of a vm. Few months ago I started a tiny sf project, sf 3.2, no problem at all (same for 3.1), everything worked fine.
But today, I created a new symfony 3.3 project, and it was unsuable, the page took 30 sec to load (after I put app_dev.php). I even re-installed my bash, clean install, still the same (but no problem with symfony 3.2). I tried on my vm, it was all good, so the problem is only on the ubuntu bash for windows :(
The text was updated successfully, but these errors were encountered: