cURL error 6: getaddrinfo() thread failed to start (PHP – Laravel)

Since several month I get the curl error 6 thread failed to start inside my laravel job queue on all my http call.

I understand that it’s related with the ulimit variable of my server but even with the ulimit set to 2048 I got this error.

It occurs only when code is processed in the job, the same code outside a job works perfectly.

It’s difficult to debug because I can’t reproduce this on local and when I push a new version on the prod, the errors disappears (until it come back hour or days later).

When it show up, the error remain for few minutes or few hours or doesn’t go away (in this case it need a manual restart of the prod).

Like I said, I’ve tried to increase the ulimit variable inside my job, but it doesn’t seems to fix the issue.

Did you ever face with a similar issue ?

Any help will be very appreciate, I’ve been struggle with that for days…

PHP : 8.2
Laravel : 10.35