php - Xdebug silently catches connections with no reason
one text
Solution:
Why it's Xdebug: if I remove the Xdebug settings from Dockerfile, everything starts working. Also, requests hang like it happens when I debug them, i.e. they die after a few minutes waiting with the
504 Gateway Time-outerror.
Enable Xdebug log to confirm that the debug session is established and check what communication is going on there (if any). This should give you some clues on what that might be.
Anyway, it looks like you have some service on that TCP 10000 port already (on your host OS (Mac)) that prevents PhpStorm from listening there (IDE can detect already occupied port on Windows and Linux but not on Mac -- WI-29443).
Use something like sudo lsof -nP -iTCP -sTCP:LISTEN and check what that service might be. Then either shutdown that app or use another port (either for that app or for your Xdebug communications).