You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If this is run within a test, then Symfony HttpClient pauses for 30 seconds and times out in the destruct process. It looks like concurrent queries actually partly run when added & then cause an error in destruct if data is not retrieved.
This causes an issue in a Symfony app where a Query Manager has some default queries (e.g. primary navigation) but some controllers do not retrieve any data (e.g. endpoint to return static data). This has the effect of a fatal error after 30 seconds of the page response being sent to the browser.
Replicate in w3c-website-frontend via: ./vendor/bin/phpunit tests/Controller/JsonControllerTest.php
Fatal error: Uncaught Symfony\Component\HttpClient\Exception\TimeoutException: Idle timeout reached for "https://cms-dev.w3.org/api/". in /Users/sjones/Sites/w3c/w3c-website-frontend/vendor/symfony/http-client/Chunk/ErrorChunk.php:65
Stack trace:
#0 /Users/sjones/Sites/w3c/w3c-website-frontend/vendor/symfony/http-client/Response/CommonResponseTrait.php(157): Symfony\Component\HttpClient\Chunk\ErrorChunk->isFirst()
#1 /Users/sjones/Sites/w3c/w3c-website-frontend/vendor/symfony/http-client/Response/TransportResponseTrait.php(141): Symfony\Component\HttpClient\Response\CurlResponse::initialize(Object(Symfony\Component\HttpClient\Response\CurlResponse), -0)
#2 /Users/sjones/Sites/w3c/w3c-website-frontend/vendor/symfony/http-client/Response/CurlResponse.php(255): Symfony\Component\HttpClient\Response\CurlResponse->doDestruct()
#3 [internal function]: Symfony\Component\HttpClient\Response\CurlResponse->__destruct()
#4 {main}
thrown in /Users/sjones/Sites/w3c/w3c-website-frontend/vendor/symfony/http-client/Chunk/ErrorChunk.php on line 65
The text was updated successfully, but these errors were encountered:
Replicate in w3c-website-frontend via: ./vendor/bin/phpunit tests/Controller/JsonControllerTest.php
This test and related controller don't exist anymore, but this can still be easily replicated by creating a controller action that does nothing. And the timeout doesn't only appear when running tests.
See the langNav action and go to https://localhost:8000/lang-nav/ (using symfony embedded server). You should see the error appear in server output.
To replicate:
If this is run within a test, then Symfony HttpClient pauses for 30 seconds and times out in the destruct process. It looks like concurrent queries actually partly run when added & then cause an error in destruct if data is not retrieved.
This causes an issue in a Symfony app where a Query Manager has some default queries (e.g. primary navigation) but some controllers do not retrieve any data (e.g. endpoint to return static data). This has the effect of a fatal error after 30 seconds of the page response being sent to the browser.
Replicate in w3c-website-frontend via:
./vendor/bin/phpunit tests/Controller/JsonControllerTest.php
The text was updated successfully, but these errors were encountered: