More Than Just Web Design | INTERNET ENGINEERING | APPLICATION | DESIGN
Out of Memory
Posted: 04/07/10
It Really Does Need That Much
One of my clients is interested in having us develop a link between the popular Quickbooks accounting package, and a web store. The idea is that rather than the web store flinging emails wildly at the sales department, it instead pushes a sales order directly into their Quickbooks system.
Rather than reinvent the wheel, I did a little research and happened upon a PHP frame work that purports to greatly simplify this process, at least the Quickbooks part of it which uses its own unique XML messaging system to communicate with the Quickbooks Web Connector (QBWC). Following all the examples supplied resulted in a consistent PHP out of memory error. Hmm. The default setting in php.ini is for a 16MB memory size, surely it can't be using more than that?
Actually, it can - 17MB in fact, according to memory_get_peak_usage(). Of course, I only found this out after bolting ini_set('memory_limit','256M') into the top of the script.
I'm always wary of arbitrarily shoving the memory limit to a higher value, since there's always the possibility that the code being developed has a bug in it that's eating memory like it's going out of fashion, but in this case there seems little choice but to increase the limit.