-
Notifications
You must be signed in to change notification settings - Fork 72
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
Period of 502 Bad Gateway #47
Comments
Hi @erfanimani thanks for your help. I'm also experiencing that in some projects (it's more visible in large projects with a big ammount of code). I don't have much information about that, but I think that containers in mac behave different than in linux because of the filesystem. Docker for mac can't use "native" filesystem and it needs some kind of virtualization, so probably docker for mac is making virtual mounts and copying files inside it (the reason of the bad performance). I don't recomend you to mount pub, because the filesystem sync in docker for mac is really slow, you could use a volume and do a sync container -> host like we do with vendor (watch command). Maybe you can do a deeper debug using the Console app for Mac. I'm sorry for not being more helpful, if you need something please let us know! |
Thanks Daniel, this was very helpful actually. I'll experiment some more
and update the ticket.
…On Thu, Apr 18, 2019, 22:13 Daniel Lozano ***@***.***> wrote:
Hi @erfanimani <https://github.com/erfanimani> thanks for your help. I'm
also experiencing that in some projects (it's more visible in large
projects with a big ammount of code).
I don't have much information about that, but I think that containers in
mac behave different than in linux because of the filesystem. Docker for
mac can't use "native" filesystem and it needs some kind of virtualization,
so probably docker for mac is making virtual mounts and copying files
inside it (the reason of the bar performance).
I don't recomend you to mount pub, because the filesystem sync in docker
for mac is really slow, you could use a volume and do a sync container ->
host like we do with vendor (watch command).
Maybe you can do a deeper debug using the Console app for Mac
<https://docs.docker.com/docker-for-mac/troubleshoot/#check-the-logs>.
I'm sorry for not being more helpful, if you need something please let us
know!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#47 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAHDFJSHXABUNKHS77T3Q2LPRB6YBANCNFSM4HG2DZTQ>
.
|
Hi, as far as I investigated you get a 502 Bad Gateway until the phpfpm container logs the "fpm is ready to handle connections" which takes approximately 15 seconds on my mac. You can see that with a dockergento docker-compose logs -f after starting the containers. |
phpfpm_1 | [03-May-2019 10:23:57] NOTICE: ready to handle connections it takes more than 1 min for me! |
@danielozano How would one go about changing pub to be mounted the same way as vendor? I've got 88GB of images in my pup folder and it takes over an hour to spin up. |
@powelles if it helps, I don't actually mount pub at all. I just run |
Hi there,
Firstly, thanks for providing such a useful Docker environment — the best and fastest I've tried for Magento 2 development so far.
After every restart, there's a period where the web server will "502 Bad Gateway" instantly. At first this was quite annoying because I don't have an indication of when it has "finished" restarting, even though the command itself works quickly. Now I just look at OSX Activity Monitor, and check when the CPU has died down; com.docker.hyperkit will use 120%+ CPU during the 502 error, but Nginx will work well after the CPU has done "doing its thing".
What is it actually doing? Is there a verbose command option that ensures the work is done synchronously? On a large project with app and pub as delegated mounts this is now taking multiple minutes to finish, and it can be quite annoying because as you know, the container restarts often (during copy operations, debugging on/off, etc).
Happy to look into this myself.. I might need some tips.
Thanks
The text was updated successfully, but these errors were encountered: