is `docker/sdk up` (without `-x`) to run env. with...
# docker
g
is
docker/sdk up
(without
-x
) to run env. without xdebug? my xdebug's still running even without
-x
which could be my timeout issue on ubuntu, anyone has the same thing? https://sprykercommunity.slack.com/archives/G01D3R3TDGQ/p1603184671011500?thread_ts=1603182704.009100&cid=G01D3R3TDGQ
maybe @high-pencil-62400 can help too (after meeting) ? 🙂
w
You could try connecting to the gateway container via docker (shell is
ash
)and checking the env vars via export
g
i'm sure xdebug is enabled even with
docker/sdk up
w
Like
docker exec -t spryker_b2c_dev_gateway_1 ash -c export
should show
export SPRYKER_XDEBUG_ENABLE=''
for it to be disabled
g
Copy code
export SPRYKER_XDEBUG_ENABLE=''
export SPRYKER_XDEBUG_MODE_ENABLE='1'
w
Hm this should pass the request correctly without debugging, it would be set to
SPRYKER_XDEBUG_ENABLE='1'
otherwise (`MODE`is not used when debug is disabled)
h
Currently
docker/sdk up
is running both xdebug and non-xebug processes. So debug session is controlled by request. If you set cookie XDEBUG_SESSION debugging will be enabled.
g
how can I do it, removing all the cookie & disabling xdebug addon, and having all xdebug params like this doesn't help?
Copy code
export SPRYKER_XDEBUG_ENABLE='0'
export SPRYKER_XDEBUG_MODE_ENABLE='0'
@high-pencil-62400
h
No. Just cookie. If it is about HTTP request. CLI is controlled by -x argument.
What are the symptoms?
g
so i removed all the cookies from browser like this, I thnk it should be enough ist it?
most of the times I still always get
Fail whale
h
But why do you think it is connected to xdebug?
g
maybe not, but that is the only reason I can see now, since i got timeout issue & xdebug seems to be always enabled even when I run
docker/sdk up
without -x and i already removed all the cookie
is there anyway to correctly disable xdebug so we can see if it works in this case to make sure xdebug is/isn't the reason?
w
Do the following to check: • run
docker exec spryker_b2c_dev_yves_eu_1 ps auxf
- look at the PIDs of the FPM workers • run
docker logs spryker_b2c_dev_yves_eu_1 --follow
• do your request on the browser and look where it ends up, you will get a log entry that contains the PID, and then you can check whther it's from the debug FPM or the normal one (like "child XX said into stderr")
g
Copy code
$ docker exec spryker_b2c_dev_yves_eu_1 ps auxf

spryker       14  0.0  0.0 499296  6308 ?        S    07:05   0:00  \_ php-fpm: pool worker
spryker       15  0.0  0.0 499296  6372 ?        S    07:38   0:00  \_ php-fpm: pool worker
Copy code
[21-Oct-2020 07:38:53] NOTICE: [pool worker] child 15 started
[21-Oct-2020 07:51:48] WARNING: [pool worker] child 14 said into stderr: "{"@timestamp":"2020-10-21T07:51:07.240714+00:00","@version":1,"host":"97c991da4ddf","message":"WEB Request YVES [GET] /","type":"YVES","channel":"Yves","level":"INFO","monolog_level":200,"extra":{"environment":{"application":"YVES","environment":"docker.dev","store":"DE","codeBucket":"DE","locale":"en_US"},"server":{"url":"<http://yves.de.spryker.local/>","is_https":false,"hostname":"yves.de.spryker.local","user_agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36","user_ip":"172.22.0.21","request_method":"GET","referer":null},"request":{"requestId":"428d549b","type":"WEB","request_params":[]}}}"
[21-Oct-2020 07:51:48] WARNING: [pool worker] child 14 said into stderr: "{"@timestamp":"2020-10-21T07:51:48.376643+00:00","@version":1,"host":"97c991da4ddf","message":"WEB Response YVES [200]","type":"YVES","channel":"Yves","level":"INFO","monolog_level":200,"extra":{"environment":{"application":"YVES","environment":"docker.dev","store":"DE","codeBucket":"DE","locale":"en_US"},"server":{"url":"<http://yves.de.spryker.local/>","is_https":false,"hostname":"yves.de.spryker.local","user_agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36","user_ip":"172.22.0.21","request_method":"GET","referer":null},"request":{"requestId":"428d549b","type":"WEB","request_params":[]}}}"
[21-Oct-2020 07:55:53] WARNING: [pool worker] child 15, script '/data/public/Yves/index.php' (request: "GET /index.php") execution timed out (64.053657 sec), terminating
[21-Oct-2020 07:55:53] WARNING: [pool worker] child 15 exited on signal 15 (SIGTERM) after 1020.003735 seconds from start
[21-Oct-2020 07:55:53] NOTICE: [pool worker] child 22 started
I don't think we have much info from here @white-helmet-93908
w
PID 14 handled the request, which fpm does that belong to? debug or normal? (btw it was confirmed yesterday in the foundations-channel that only the cookie should control the debugging)
h
Is it possible to change index.php file to just boot the app and then exit?
w
Oh yeah, that works, just throw a
phpinfo(); die();
into that
g
not sure what just happened, what i've done just to delete some file from
deployment/default
folder then clone again
docker-sdk
and it seems work now, though still slowly
h
That are 2 php-fpm
g
yes, they're PID of these 2 php-fpm
huh, looks like when i disable xdebug addons it turns out again the
fail whale
and when i enable it, it works again but very slow!
h
you can disable xdebug images completely: deploy.dev.yml
Copy code
...
docker:
...
  debug:
    enabled: true
    xdebug:
      enabled: false
then boot + up
g
i just run
docker/sdk up
now it works without xdebug addons enabled, that's great, but still slow
ah, still sometimes
fail whale
h
I assume xdebug is not a reason.
g
and
Copy code
Spryker \ Shared \ SessionRedis \ Handler \ Exception \ LockCouldNotBeAcquiredException
Spryker\Shared\SessionRedis\Handler\SessionHandlerRedisLocking could not acquire access to the session 583988c8caa75699eb98e6793b821d7c
or do i need to rebuild everything by
docker/sdk reset
?
h
That is session lock issue and it is expected. If page is loaded within 200ms that problem won’t be very often
Let’s try to figure out what is the real reason.
g
do you mean pairing?
I'm trying now with
Copy code
docker:
...
    debug:
        enabled: false
        xdebug:
            enabled: false
h
Please, run the following:
docker/sdk bootstrap deploy.yml && docker/sdk up
This will use demo mode when the codebase is embedded so file system is not shared.
g
rebuilding is in progress, will inform you how it work
h
Oki
g
it just finished, i'm trying to load the homepage now
so it's fail whale again
hmm, interesting, now I got this for the homepage loading
Copy code
wig \ Error \ RuntimeError
An exception has been thrown during the rendering of a template ("None of the chained routers were able to generate route: Route '/en' not found, Route 'Route '/en' not found' not found") in "@ShopUi/components/molecules/logo/logo.twig" at line 18.
docker/sdk bootstrap deploy.yml && docker/sdk up
this works well
very quick & smoothly @high-pencil-62400 ☝️
h
Copy code
'/en' not found
Wait for background jobs to publish and sync
Ok. So the problem is file sharing or file system performance in docker.