Facebook Business SDK for PHP - Failed sending HTTP request: Header overflow

188 views Asked by At

I am trying to gather a year's worth of data for a select ad account but I get the following exception:

FacebookAds\Exception\Exception
Failed sending HTTP request: Header overflow

The exception happens at the following line of code:

$adData = [];
foreach ($fbadaccount->getAds($adFields, $adParams) as $object) {
            $adData[] = $object->getData();
}

This code works perfectly fine for smaller time frames.

I understand it is attempting to get a lot of data but I'm trying to find a solution.

Could this potentially be environment-related? i.e. nginx

1

There are 1 answers

1
holden321 On

The "Header overflow" error occurs when the HTTP request header is too large.

Perhaps because of the cookies being sent.