Guzzle calls in helper function randomly return 'magic request methods require a URI' error

395 Views Asked by At

My server is running on PHP 7.2 - Laravel 5.8 - Redis Jobs - NewRelic for monitoring configuration.

The guzzle call is written inside helper function (that is autoloader from composer.json). The problem happens randomly. We get this error

production.INFO: Magic request methods require a URI and optional options array

I have read online that it's causing by a Memory leak (ref: https://discuss.newrelic.com/t/php-when-to-call-getconnection/114848)

We have many guzzle calls in our system and none is crashing and yes we do gazillions of Guzzle calls in a day.

I'm wondering if all other guzzle calls are inside a class not in a helper function. Is it OK to call Guzzle Request within a helper function, or is this the cause of this random error?

1

There are 1 best solutions below

0
On

https://discuss.newrelic.com/t/php-when-to-call-getconnection/114848/14

Or restart services, that can resolve it in the short-term. I have not found any long-term fixes for this at this time.