0

I recently set up my docker environment after I broke my git (I was unable to push) I've never experienced such slow speed before and am thinking it's something to do with config or a setting. Since then I reset and reinstalled all my setup for Magento using varnish, Odoo, Nginx but when I use docker-compose up it sits for around 3-5 minutes, when I try to access the localhost website it says "Nginx error: 502 bad gateway" and then suddenly says "fpm is running" cli_1 excited with code 0 following by cron_1 and it starts working perfectly!

This is the only part of the code which is erroring out which is just after varnish:

web_1      | 2021/07/23 05:55:20 [error] 14#14: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.0.7, server: localhost, request: "GET /product-demos/?___store=default HTTP/1.1", upstream: "fastcgi://192.168.0.5:9000", host: "magento2.docker", referrer: "http://magento2.docker/amtech_admin/cms/page/index/key/9d496b8b04fc71dc5935aa58698810740c29532496e9a59fc67446e21e72a2fb/"

Since I am using Magento 2, it has lots of inbuilt caching, I frequently have to docker down and clear caching + assets then up again. Waiting 3-5 minutes might not sound like much but it's truly painful when you're actively developing.

Can you provide any insight into how I can fix this issue or further diagnose it? Overall the website is very slow and doesn't time out fast, usually waiting 2 minutes to load each page with magento each page has ?__store=default for example which when viewing in the Inspect element -> Network tab -> it shows it's loading for minutes before working. I currently have to go through open all the pages in a new tab then go through edit each one.

Image of cli

Bradley Kirkland
  • 621
  • 1
  • 6
  • 26
  • What's your host OS? How are you launching the container? Some frameworks can be very very slow on some host OSes if you try to inject code using a bind mount rather than keeping it in an image. (See also perhaps [Docker is extremely slow when running Laravel on Nginx container wsl2](https://stackoverflow.com/questions/63036490/docker-is-extremely-slow-when-running-laravel-on-nginx-container-wsl2).) – David Maze Jul 23 '21 at 10:57
  • Using WINDOWS PC running WSL with docker. Thank you for the article I'll take a look – Bradley Kirkland Jul 23 '21 at 11:14

0 Answers0