The following error message is popping up in our server logs.
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 122677002 bytes) in /Users/username/Sites/FileMaker/Implementation/FileMakerImpl.php on line 348
A glance at line 348 in FileMakerImpl.php shows that it is a call to curl_exec within the _execute function that is generating the error. A quick web search reveals that calling curl_exec while also setting CURLOPT_RETURNTRANSFER to true generates memory leaks. CURLOPT_RETURNTRANSFER is set to true a few lines above the call to curl_exec so we are in the right territory.
However, all of this code is pretty deep within the "do not touch" zone of the API. How can we track this back to our code to see what is the root cause of the problem?