I've a controller that passes large variables to a view, but nothing unreasonable given the context (PHP uses around 100 MB of RAM).
My problem is that DebugKit generates a large temporary file that requires a lot of memory to unserialize on next run:
app\tmp\cache\cake_toolbar_cache7ee836dd8c8f85f0f69f716bad0bbd94
It's the same problem described at Solution to Fatal error - Allowed memory size exhausted in CakePHP FileEngine.php, except that my file grows on every page load. No matter how much memory I let PHP allocate, it'll eventually grow above the limit the system is able to handle. I need to remove the file manually and start over.
I'm not fully sure of what exact piece of data is DebugKit trying to handle but the file appears to contain a top level numeric array, each of which subarrays contain a complete copy of my data set. I suspect it might be the request history.
I've confirmed that there's no memory issue when debug level is zero and DebugKit doesn't load so it won't be an issue in Production but it gets on my way while developing. Is there a simple fix?