For anyone having this problem using PHP Built-in web server (with Laravel in my case), it is caused by your request being blocked by file_get_contents() / curl functions.
Docs of dev server say that
PHP applications will stall if a request is blocked.
Since the PHP built-in server is single threaded, requesting another url on your server
will halt first request and it gets timed out.
As a solution, you can use proper web server (nginx, apache etc.).
Edit: As of now, I really suggest you to use Laravel Sail as a development environment for PHP projects. It saves you lots of time with setup and configuration of different services (webserver, databases, queues, etc.).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…