Guzzle and XDebug timeouts

I am using Xdebug to debug code using hang calls.

In any other code, Xedebug works fine.

But whenever there are client calls using Guzzle, all I get is a timeout.

I use:

  • PhpStorm 2017.2
  • Docker featuring richarvey/nginx-php-fpm:latest (nginx + php fpm)
  • Xdebug on Php 7.1

here is the code snippet where it hangs:

  public function fetch(): string { $content = ''; $completePath = self::FETCH_PATH . $this->id; $request = $this->httClient->get($completePath); if ($request->getStatusCode() == 200) { $content = $request->getBody()->getContents(); } return $content; } 
+5
source share
1 answer

I had the same problem. I believe the problem arose when two different php processes tried to open an Xdebug connection at the same time with the same IDE KEY. (for example, when you run a test with php cli and the test makes a request to your apache / nginx / php-fpm). I assigned a different Xdebug IDE key for cli and fpm and it worked for me.

0
source

Source: https://habr.com/ru/post/1272396/


All Articles