Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 16384 bytes) in /home/bitrix/www/bitrix/modules/main/classes/mysql/database_mysqli.php on line 47

Fatal error: Uncaught Bitrix\Main\DB\SqlQueryException: Mysql query error: (2014) Commands out of sync; you can't run this command now in /home/bitrix/www/bitrix/modules/main/lib/db/mysqliconnection.php:137 Stack trace: #0 /home/bitrix/www/bitrix/modules/main/lib/db/connection.php(330): Bitrix\Main\DB\MysqliConnection->queryInternal('SELECT \n\t`main_...', Array, NULL) #1 /home/bitrix/www/bitrix/modules/main/lib/orm/query/query.php(3357): Bitrix\Main\DB\Connection->query('SELECT \n\t`main_...') #2 /home/bitrix/www/bitrix/modules/main/lib/orm/query/query.php(825): Bitrix\Main\ORM\Query\Query->query('SELECT \n\t`main_...') #3 /home/bitrix/www/bitrix/modules/main/lib/orm/data/datamanager.php(500): Bitrix\Main\ORM\Query\Query->exec() #4 /home/bitrix/www/bitrix/modules/main/lib/analytics/sitespeed.php(95): Bitrix\Main\ORM\Data\DataManager::getList(Array) #5 /home/bitrix/www/bitrix/modules/main/lib/analytics/counter.php(92): Bitrix\Main\Analytics\SiteSpeed::isIntranetSite('s1') #6 /home/bitrix/www/bitrix/modules/main/classes/ge in /home/bitrix/www/bitrix/modules/main/lib/db/mysqliconnection.php on line 137

Fatal error: Uncaught Error: Cannot pass parameter 3 by reference in /home/bitrix/www/bitrix/modules/main/lib/orm/entity.php:746 Stack trace: #0 /home/bitrix/www/bitrix/modules/main/lib/orm/data/datamanager.php(77): Bitrix\Main\ORM\Entity::normalizeEntityClass('Bitrix\\Security...') #1 /home/bitrix/www/bitrix/modules/main/lib/orm/data/datamanager.php(581): Bitrix\Main\ORM\Data\DataManager::getEntity() #2 /home/bitrix/www/bitrix/modules/main/lib/orm/data/datamanager.php(1589): Bitrix\Main\ORM\Data\DataManager::normalizePrimary('69prgF1Jy3HzmdS...') #3 /home/bitrix/www/bitrix/modules/security/classes/general/session_db.php(100): Bitrix\Main\ORM\Data\DataManager::delete('69prgF1Jy3HzmdS...') #4 /home/bitrix/www/bitrix/modules/security/classes/general/session_handler.php(28): CSecuritySessionDB::write('ymWC3sHVvQmWlHT...', 'SESS_AUTH|a:1:{...') #5 [internal function]: CSecuritySessionHandler->write('ymWC3sHVvQmWlHT...', 'SESS_AUTH|a:1:{...') #6 {main} thrown in /home/bitrix/www/bitrix/modules/main/lib/orm/entity.php on line 746