What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

is `docker/sdk up` (without `-x`) to run env. without xdebug? my xdebug's still running even without

U01C1TABT0V
U01C1TABT0V Posts: 61 πŸ§‘πŸ»β€πŸš€ - Cadet

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

Β«1

Comments

  • U01C1TABT0V
    U01C1TABT0V Posts: 61 πŸ§‘πŸ»β€πŸš€ - Cadet

    maybe @ULYHPR789 can help too (after meeting) ? πŸ™‚

  • U01D7EW4N73
    U01D7EW4N73 Posts: 9 πŸ§‘πŸ»β€πŸš€ - Cadet

    You could try connecting to the gateway container via docker (shell is ash)and checking the env vars via export

  • U01C1TABT0V
    U01C1TABT0V Posts: 61 πŸ§‘πŸ»β€πŸš€ - Cadet

    i'm sure xdebug is enabled even with docker/sdk up

  • U01D7EW4N73
    U01D7EW4N73 Posts: 9 πŸ§‘πŸ»β€πŸš€ - Cadet

    Like docker exec -t spryker_b2c_dev_gateway_1 ash -c export should show export SPRYKER_XDEBUG_ENABLE='' for it to be disabled

  • U01C1TABT0V
    U01C1TABT0V Posts: 61 πŸ§‘πŸ»β€πŸš€ - Cadet
    export SPRYKER_XDEBUG_ENABLE=''
    export SPRYKER_XDEBUG_MODE_ENABLE='1'
    
  • U01D7EW4N73
    U01D7EW4N73 Posts: 9 πŸ§‘πŸ»β€πŸš€ - Cadet

    Hm this should pass the request correctly without debugging, it would be set to SPRYKER_XDEBUG_ENABLE='1' otherwise (MODEis not used when debug is disabled)

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    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.

  • U01C1TABT0V
    U01C1TABT0V Posts: 61 πŸ§‘πŸ»β€πŸš€ - Cadet

    how can I do it, removing all the cookie & disabling xdebug addon, and having all xdebug params like this doesn't help?

    export SPRYKER_XDEBUG_ENABLE='0'
    export SPRYKER_XDEBUG_MODE_ENABLE='0'
    
  • U01C1TABT0V
    U01C1TABT0V Posts: 61 πŸ§‘πŸ»β€πŸš€ - Cadet
  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    No. Just cookie. If it is about HTTP request.

    CLI is controlled by -x argument.

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    What are the symptoms?

  • U01C1TABT0V
    U01C1TABT0V Posts: 61 πŸ§‘πŸ»β€πŸš€ - Cadet

    so i removed all the cookies from browser like this, I thnk it should be enough ist it?

  • U01C1TABT0V
    U01C1TABT0V Posts: 61 πŸ§‘πŸ»β€πŸš€ - Cadet

    most of the times I still always get Fail whale

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    But why do you think it is connected to xdebug?

  • U01C1TABT0V
    U01C1TABT0V Posts: 61 πŸ§‘πŸ»β€πŸš€ - Cadet

    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

  • U01C1TABT0V
    U01C1TABT0V Posts: 61 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited October 2020

    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?

  • U01D7EW4N73
    U01D7EW4N73 Posts: 9 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited October 2020

    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")

  • U01C1TABT0V
    U01C1TABT0V Posts: 61 πŸ§‘πŸ»β€πŸš€ - Cadet
    $ 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
    
  • U01C1TABT0V
    U01C1TABT0V Posts: 61 πŸ§‘πŸ»β€πŸš€ - Cadet
    [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
    
  • U01C1TABT0V
    U01C1TABT0V Posts: 61 πŸ§‘πŸ»β€πŸš€ - Cadet

    I don't think we have much info from here @U01D7EW4N73

  • U01D7EW4N73
    U01D7EW4N73 Posts: 9 πŸ§‘πŸ»β€πŸš€ - Cadet

    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)

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    Is it possible to change index.php file to just boot the app and then exit?

  • U01D7EW4N73
    U01D7EW4N73 Posts: 9 πŸ§‘πŸ»β€πŸš€ - Cadet

    Oh yeah, that works, just throw a phpinfo(); die(); into that

  • U01C1TABT0V
    U01C1TABT0V Posts: 61 πŸ§‘πŸ»β€πŸš€ - Cadet

    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

  • U01C1TABT0V
    U01C1TABT0V Posts: 61 πŸ§‘πŸ»β€πŸš€ - Cadet
  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    That are 2 php-fpm

  • U01C1TABT0V
    U01C1TABT0V Posts: 61 πŸ§‘πŸ»β€πŸš€ - Cadet

    yes, they're PID of these 2 php-fpm

  • U01C1TABT0V
    U01C1TABT0V Posts: 61 πŸ§‘πŸ»β€πŸš€ - Cadet

    huh, looks like when i disable xdebug addons it turns out again the fail whale

  • U01C1TABT0V
    U01C1TABT0V Posts: 61 πŸ§‘πŸ»β€πŸš€ - Cadet

    and when i enable it, it works again but very slow!

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    you can disable xdebug images completely:

    deploy.dev.yml

    ...
    docker:
    ...
      debug:
        enabled: true
        xdebug:
          enabled: false