简体   繁体   English

PHP TeeChart内存消耗

[英]PHP TeeChart memory consumption

I've been testing creating charts in teechart for PHP using a while loop to create multiple charts via a function: 我一直在测试在PHP的teechart中创建图表,使用while循环通过函数创建多个图表:

while () {
    create_my_chart();
}

After 14 iterations of this I'm getting the following error: 经过14次迭代后,我收到以下错误:

"Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 800 bytes) in tchart\\sources\\GraphicsGD.php on line 602" “致命错误:第602行的tchart \\ sources \\ GraphicsGD.php中允许的内存大小为67108864字节耗尽(试图分配800字节)”

This implies that teeChart is not freeing memory correctly but I wondered if there is anything I can do about it? 这意味着teeChart没有正确释放内存,但我想知道我能做些什么吗?

Your allowed memory useage seems to be only 64MB. 您允许的内存使用量似乎只有64MB。 This is very small! 这个很小! Change it in the php.ini or do ini_set('memory_limit','1G') in the script to allow 1 GB memory. php.ini更改它或在脚本中执行ini_set('memory_limit','1G')以允许1 GB内存。 And test again. 再次测试。

http://php.net/manual/en/ini.core.php#ini.memory-limit http://php.net/manual/en/ini.core.php#ini.memory-limit

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM