訪問(wèn)時(shí),內(nèi)存超出,報(bào)錯(cuò)
process terminated with ERROR: E_ERROR "Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /www/wwwroot/cj.lianhezhaopin.com/vendor/illuminate/database/Eloquent/Model.php on line 496"
process terminated with ERROR: E_ERROR "Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /www/wwwroot/cj.lianhezhaopin.com/vendor/illuminate/database/Eloquent/Model.php on line 522"
Model文件報(bào)錯(cuò)
public function newInstance($attributes = [], $exists = false)
{
// This method just provides a convenient way for us to generate fresh model
// instances of this current model. It is particularly useful during the
// hydration of new objects via the Eloquent query builder instances.
$model = new static((array) $attributes);
$model->exists = $exists;
$model->setConnection(
$this->getConnectionName()
);
$model->setTable($this->getTable());
$model->mergeCasts($this->casts);
return $model;
}
/**
* Create a new model instance that is existing.
*
* @param array $attributes
* @param string|null $connection
* @return static
*/
public function newFromBuilder($attributes = [], $connection = null)
{
$model = $this->newInstance([], true);
$model->setRawAttributes((array) $attributes, true);
$model->setConnection($connection ?: $this->getConnectionName());
$model->fireModelEvent('retrieved', false);
return $model;
}
重啟服務(wù)后,然后多次訪問(wèn)之后,就會(huì)出現(xiàn)上面的錯(cuò)誤
"php": ">=7.2",
"workerman/webman-framework": "^1.5.0",
"monolog/monolog": "^2.0",
"webman/admin": "0.5.0",
"endroid/qrcode": "^4.3",
"endroid/qr-code": "^4.3",
"overtrue/pinyin": "^4.0",
"workerman/crontab": "^1.0",
"phpoffice/phpspreadsheet": "^1.28",
"webman/redis-queue": "^1.2",
"workerman/redis": "^1.0.4"