[Bitrix\Main\DB\SqlQueryException] 
Mysql query error: (2006) MySQL server has gone away (400)
SELECT 
	`sale_internals_discount_entities`.`DISCOUNT_ID` AS `DISCOUNT_ID`,
	`sale_internals_discount_entities`.`MODULE_ID` AS `MODULE_ID`,
	`sale_internals_discount_entities`.`ENTITY` AS `ENTITY`,
	`sale_internals_discount_entities`.`FIELD_ENTITY` AS `FIELD_ENTITY`,
	`sale_internals_discount_entities`.`FIELD_TABLE` AS `FIELD_TABLE`,
	`sale_internals_discount_entities`.`ID` AS `UALIAS_0`
FROM `b_sale_discount_entities` `sale_internals_discount_entities` 

WHERE `sale_internals_discount_entities`.`DISCOUNT_ID` IN (7,10,11,12,15,16,17,18,19,20,21,22,23,26,27,29,30,31,32)
/var/www/admin/www/megachas.ru/bitrix/modules/main/lib/db/mysqliconnection.php:137
#0: Bitrix\Main\DB\MysqliConnection->queryInternal(string, array, NULL)
	/var/www/admin/www/megachas.ru/bitrix/modules/main/lib/db/connection.php:330
#1: Bitrix\Main\DB\Connection->query(string)
	/var/www/admin/www/megachas.ru/bitrix/modules/main/lib/orm/query/query.php:3398
#2: Bitrix\Main\ORM\Query\Query->query(string)
	/var/www/admin/www/megachas.ru/bitrix/modules/main/lib/orm/query/query.php:825
#3: Bitrix\Main\ORM\Query\Query->exec()
	/var/www/admin/www/megachas.ru/bitrix/modules/main/lib/orm/data/datamanager.php:500
#4: Bitrix\Main\ORM\Data\DataManager::getList(array)
	/var/www/admin/www/megachas.ru/bitrix/modules/sale/lib/internals/discountentities.php:224
#5: Bitrix\Sale\Internals\DiscountEntitiesTable::getByDiscount(array)
	/var/www/admin/www/megachas.ru/bitrix/modules/sale/lib/discount/runtimecache/discountcache.php:131
#6: Bitrix\Sale\Discount\RuntimeCache\DiscountCache->getDiscountEntities(array)
	/var/www/admin/www/megachas.ru/bitrix/modules/catalog/lib/discount/discountmanager.php:640
#7: Bitrix\Catalog\Discount\DiscountManager::preloadProductDataToExtendOrder(array, array)
	/var/www/admin/www/megachas.ru/bitrix/modules/iblock/lib/component/base.php:513
#8: Bitrix\Iblock\Component\Base->initCatalogDiscountCache()
	/var/www/admin/www/megachas.ru/bitrix/modules/iblock/lib/component/base.php:4099
#9: Bitrix\Iblock\Component\Base->prepareData()
	/var/www/admin/www/megachas.ru/bitrix/modules/iblock/lib/component/base.php:4053
#10: Bitrix\Iblock\Component\Base->processResultData()
	/var/www/admin/www/megachas.ru/bitrix/modules/iblock/lib/component/element.php:286
#11: Bitrix\Iblock\Component\Element->processResultData()
	/var/www/admin/www/megachas.ru/bitrix/modules/iblock/lib/component/base.php:4551
#12: Bitrix\Iblock\Component\Base->loadData()
	/var/www/admin/www/megachas.ru/bitrix/modules/iblock/lib/component/base.php:4540
#13: Bitrix\Iblock\Component\Base->initialLoadAction()
	/var/www/admin/www/megachas.ru/bitrix/modules/iblock/lib/component/element.php:271
#14: Bitrix\Iblock\Component\Element->initialLoadAction()
	
#15: call_user_func(array)
	/var/www/admin/www/megachas.ru/bitrix/modules/iblock/lib/component/base.php:4725
#16: Bitrix\Iblock\Component\Base->doAction()
	/var/www/admin/www/megachas.ru/bitrix/modules/iblock/lib/component/base.php:4743
#17: Bitrix\Iblock\Component\Base->executeComponent()
	/var/www/admin/www/megachas.ru/bitrix/modules/main/classes/general/component.php:656
#18: CBitrixComponent->includeComponent(string, array, object, boolean)
	/var/www/admin/www/megachas.ru/bitrix/modules/main/classes/general/main.php:1041
#19: CAllMain->IncludeComponent(string, string, array, object)
	/var/www/admin/www/megachas.ru/bitrix/templates/.default/components/bitrix/catalog/catalog/element.php:228
#20: include(string)
	/var/www/admin/www/megachas.ru/bitrix/modules/main/classes/general/component_template.php:789
#21: CBitrixComponentTemplate->__IncludePHPTemplate(array, array, string)
	/var/www/admin/www/megachas.ru/bitrix/modules/main/classes/general/component_template.php:884
#22: CBitrixComponentTemplate->IncludeTemplate(array)
	/var/www/admin/www/megachas.ru/bitrix/modules/main/classes/general/component.php:764
#23: CBitrixComponent->showComponentTemplate()
	/var/www/admin/www/megachas.ru/bitrix/modules/main/classes/general/component.php:712
#24: CBitrixComponent->includeComponentTemplate(string)
	/var/www/admin/www/megachas.ru/bitrix/components/bitrix/catalog/component.php:171
#25: include(string)
	/var/www/admin/www/megachas.ru/bitrix/modules/main/classes/general/component.php:605
#26: CBitrixComponent->__includeComponent()
	/var/www/admin/www/megachas.ru/bitrix/modules/main/classes/general/component.php:680
#27: CBitrixComponent->includeComponent(string, array, boolean, boolean)
	/var/www/admin/www/megachas.ru/bitrix/modules/main/classes/general/main.php:1041
#28: CAllMain->IncludeComponent(string, string, array, boolean)
	/var/www/admin/www/megachas.ru/catalog/index.php:288
#29: include_once(string)
	/var/www/admin/www/megachas.ru/bitrix/modules/main/include/urlrewrite.php:159
#30: include_once(string)
	/var/www/admin/www/megachas.ru/bitrix/urlrewrite.php:2

Fatal error: Uncaught Bitrix\Main\DB\SqlQueryException: Mysql query error: (2006) MySQL server has gone away in /var/www/admin/www/megachas.ru/bitrix/modules/main/lib/db/mysqliconnection.php:137 Stack trace: #0 /var/www/admin/www/megachas.ru/bitrix/modules/main/lib/db/connection.php(330): Bitrix\Main\DB\MysqliConnection->queryInternal('INSERT IGNORE I...', Array, NULL) #1 /var/www/admin/www/megachas.ru/bitrix/modules/main/lib/db/connection.php(379): Bitrix\Main\DB\Connection->query('INSERT IGNORE I...', NULL) #2 /var/www/admin/www/megachas.ru/bitrix/modules/main/lib/eventmanager.php(183): Bitrix\Main\DB\Connection->queryExecute('INSERT IGNORE I...') #3 /var/www/admin/www/megachas.ru/bitrix/modules/main/lib/eventmanager.php(157): Bitrix\Main\EventManager->registerEventHandlerInternal('sale', 'OnSaleCancelOrd...', 'tcsbank.kupivkr...', 'CTCSBank', 'OnCancelOrder', 100, '', '', 1) #4 /var/www/admin/www/megachas.ru/bitrix/modules/main/classes/general/module.php(497): Bitrix\Main\EventManager->registerEventHandlerCompatible('s in /var/www/admin/www/megachas.ru/bitrix/modules/main/lib/db/mysqliconnection.php on line 137