Very heavy database in Laravel

0

Good morning: I have a database, with a column with 20,000 records, which will increase. When trying to connect locally, I get this problem:

[Mon Feb  5 10:42:12 2018] PHP Fatal error:  Allowed memory size of 
536870912 bytes exhausted (tried to allocate 200704 bytes) in C:\xampp\htdocs\applook\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php on line 67
[Mon Feb  5 10:42:12 2018] PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 32768 bytes) in C:\xampp\htdocs\applook\vendor\symfony\debug\Exception\FatalErrorException.php on line 1

How can I configure Mysql and Laravel so that there is no problem of slowness or this kind of errors? Since you already change memory_limit = 256M in php.ini

protected function createPdoConnection($dsn, $username, $password, $options)
{
    if (class_exists(PDOConnection::class) && ! $this->isPersistentConnection($options)) {
        return new PDOConnection($dsn, $username, $password, $options);
    }

    return new PDO($dsn, $username, $password, $options);
}
    
asked by Miguel Herreros Cejas 05.02.2018 в 10:49
source

0 answers