创建magento产品的xml时PHP内存限制问题
提前致谢,
我需要帮助解决php内存问题,
我在php中创建了一个自动获取magento产品数据的脚本,问题是当数据库中有大量产品时,脚本给出内存致命错误我已经更改我的 php.ini 中的内存限制为 256M,但脚本仍然没有完全执行。
我已经检查了脚本,如果产品数量不是太多,它工作正常,但如果数量较多,我的脚本无法工作。
请帮助...-
谢谢 吉腾德拉·多比
Thanks in advance,
I need help in solving php memory problem,
I have created a script in php that automatically fetch magento product data,the problem is that when there is large number of product in database, the script gives memory fatal error i have changed the memory limit to 256M in my php.ini but still the script not executing totally.
i have checked the script its working fine if there is number of product is not too much but if there is larger number my script not working..
Please help...
-Thanks
Jitendra Dhobi
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Magento 在 Product 类的实现中存在一些内存泄漏,因此这将是未来的一个问题。这似乎是系统中的导入/导出实用程序以相对较小的块工作的部分原因。
如果您在客户端使用这些数据,分页绝对是最佳选择。如果这是某种数据转储,您可以考虑获取比 Magento 对象更低级别的数据。这种方法会更快,但当涉及到 Magento 版本之间的更改时,会更加脆弱。
希望有帮助!
谢谢,
乔
Magento has some memory leaks in its implementation of the Product class, so this will be an issue into the future. This seems to be part of the reason that the import/export utilities in the system work in relatively small chunks.
If you are using this data on the client side, pagination is definitely the way to go. If this is some kind of data dump, you could consider grabbing the data at a lower level than the Magento objects. This approach will be faster, but much more fragile when it comes to changes between Magento versions.
Hope that helps!
Thanks,
Joe