'Laravel Guzzle jobs failure, kills queue until restart (GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host:)

using Laravel Horizon to run our queues on Redis but keep running into the same error.

Almost a daily occurrence, we will suddenly get a Guzzle curl error that seems to wipe out all jobs at once any that are added after that.

The only way to get the jobs to work again is to restart the queue / terminate horizon which we now have on a schedule.

There's not one particular job that causes the error but it's always down to Guzzle.

An example of the Guzzle error would be:

GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: login.salesforce.com

The other odd thing is that the timestamps for all the failed jobs with this error are at the same second so it's almost like it just wipes them all out together without trickling through the queue.

I've been Googling this a while but not come across the same issue that only randomly happens.

This seems to have only started with switching to Redis / Horizon too.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source