Skip to content

artisan puts curl request in infinite loop #52140

Answered by m4tr1ck
duran004 asked this question in Q&A
Discussion options

You must be logged in to vote

@duran004, did you also test this behavior outside of using php artisan serve, which generally makes use of only one worker?

I could reproduce this behavior. With artisan serve, you only have one PHP worker for a request. With your first request, you are blocking the single worker. This worker will try to access the URL given by the route function, which will return the full URL to the HTTP client, which then starts a new request. This request can not be processed by artisan serve because the single worker is already occupied with your initial request. That means you don't have a bug; it is not an infinite loop. Your HTTP client is only waiting for your service to get a new free worker to…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@duran004
Comment options

@Nowocyn
Comment options

@duran004
Comment options

@duran004
Comment options

Answer selected by duran004
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #52136 on July 16, 2024 02:34.