laravel - 如何最大化内存以在 Laravel 中由工厂生成大量数据?
问题描述
我在 Windows 10 的本地环境中使用 XAMP v3.2.4 和 PHP 7.4。
在 Laravel 中,我想通过工厂数据生成器在 MySQL MariaDB 数据库中生成 100 万条记录,但出现内存错误。我怎样才能使内存更大?
PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 69632 bytes) in C:\xampp\htdocs\hasht\vendor\fzaninotto\faker\src\Faker\Provider\Base.php on line
195
PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 32768 bytes) in C:\xampp\htdocs\hasht\vendor\laravel\framework\src\Illuminate\Support\Manager.php
on line 1
解决方案
推荐阅读
- flutter - 如何在 Table Flutter 中显示 json 数据
- wso2 - WSO2 EI 将传入的 Json 请求转换为 XML 并将其发送到 WSDL 端点
- python - Python IBAPI reqContractDetails 在第二次运行时不会返回结果
- c++ - 创建构造函数时未解析的外部符号
- javascript - 使用 React-Hooks/Axios 获取数据并显示在表格中
- vlang - vlib 中某些模块中的变量“C”是什么?
- c# - 我如何在 Asp .Net 网站中执行 C# 代码
- pandas - 如何重命名不完全匹配的熊猫数据框的列?
- android - 怎么压缩超大图不oom?
- google-apps-script - Google Apps 脚本 - 将 n 小时添加到当前时间和日期