Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

sykorax's avatar

cURL fails with timeout inside background job

Hi,

We have a monolith application stack running in Kubernetes. We use RabbitMQ as a message broker. Some of the jobs invoke external services with Guzzle HTTP client using the general cURL handler.

The strange thing is that sometimes the request is successful sometimes it is not. It's not appearing to be something that is deterministic. After some debugging i realised that the cURL is what fails actually. Guzzle could not return with a response but something terminated the cURL process and the response variable has not been set at all. This was a little bit odd since you would expect such a success or a fail response.

So i decided to head to the natural bash CLI and make those cURL requests manually. Well nothing special happened, everything worked very well.

And now i'm here to ask the question. Does anybody have experience with this kind of issue or something similar to it? I was thinking if there's something might be stuck in the PHP process since Horizon runs jobs in managed processes thus it does not reserve a single process for each jobs. This might lead to some kind of memory leak or whatever.

0 likes
0 replies

Please or to participate in this conversation.