[Bitrix\Main\DB\SqlQueryException] 
Mysql query error: (2006) MySQL server has gone away (400)
SELECT 
	`catalog_discount`.`ID` AS `ID`,
	`catalog_discount`.`TYPE` AS `TYPE`,
	`catalog_discount`.`SITE_ID` AS `SITE_ID`,
	`catalog_discount`.`ACTIVE` AS `ACTIVE`,
	`catalog_discount`.`ACTIVE_FROM` AS `ACTIVE_FROM`,
	`catalog_discount`.`ACTIVE_TO` AS `ACTIVE_TO`,
	`catalog_discount`.`RENEWAL` AS `RENEWAL`,
	`catalog_discount`.`NAME` AS `NAME`,
	`catalog_discount`.`SORT` AS `SORT`,
	`catalog_discount`.`MAX_DISCOUNT` AS `MAX_DISCOUNT`,
	`catalog_discount`.`VALUE_TYPE` AS `VALUE_TYPE`,
	`catalog_discount`.`VALUE` AS `VALUE`,
	`catalog_discount`.`CURRENCY` AS `CURRENCY`,
	`catalog_discount`.`PRIORITY` AS `PRIORITY`,
	`catalog_discount`.`LAST_DISCOUNT` AS `LAST_DISCOUNT`,
	`catalog_discount`.`USE_COUPONS` AS `USE_COUPONS`,
	`catalog_discount`.`UNPACK` AS `UNPACK`,
	`catalog_discount`.`CONDITIONS` AS `CONDITIONS`
FROM `b_catalog_discount` `catalog_discount` 

WHERE `catalog_discount`.`ID` IN (2)
AND `catalog_discount`.`SITE_ID` = 's1'
AND (`catalog_discount`.`TYPE` IS NULL OR `catalog_discount`.`TYPE` = 0)
AND (
	(`catalog_discount`.`ACTIVE_FROM` IS NULL)
	OR `catalog_discount`.`ACTIVE_FROM` <= '2019-05-25 17:00:29'
)
AND (
	(`catalog_discount`.`ACTIVE_TO` IS NULL)
	OR `catalog_discount`.`ACTIVE_TO` >= '2019-05-25 17:00:29'
)
AND `catalog_discount`.`USE_COUPONS` = 'N'
/home/bitrix/www/bitrix/modules/main/lib/db/mysqliconnection.php:137
#0: Bitrix\Main\DB\MysqliConnection->queryInternal(string, array, NULL)
	/home/bitrix/www/bitrix/modules/main/lib/db/connection.php:330
#1: Bitrix\Main\DB\Connection->query(string)
	/home/bitrix/www/bitrix/modules/main/lib/orm/query/query.php:3190
#2: Bitrix\Main\ORM\Query\Query->query(string)
	/home/bitrix/www/bitrix/modules/main/lib/orm/query/query.php:806
#3: Bitrix\Main\ORM\Query\Query->exec()
	/home/bitrix/www/bitrix/modules/main/lib/orm/data/datamanager.php:457
#4: Bitrix\Main\ORM\Data\DataManager::getList(array)
	/home/bitrix/www/bitrix/modules/catalog/general/discount.php:1431
#5: CAllCatalogDiscount::GetDiscount(integer, integer, array, array, string, string, array)
	/home/bitrix/www/bitrix/modules/catalog/general/product.php:1595
#6: CAllCatalogProduct::GetOptimalPriceList(array, array, string, array, string)
	/home/bitrix/www/bitrix/modules/catalog/lib/product/catalogprovider.php:288
#7: Bitrix\Catalog\Product\CatalogProvider->getData(array, array)
	/home/bitrix/www/bitrix/modules/catalog/lib/product/catalogprovider.php:2967
#8: Bitrix\Catalog\Product\CatalogProvider->createProductsListWithCatalogData(array)
	/home/bitrix/www/bitrix/modules/catalog/lib/product/catalogprovider.php:4171
#9: Bitrix\Catalog\Product\CatalogProvider->getAvailableQuantity(array)
	/home/bitrix/www/bitrix/modules/catalog/lib/product/catalogprovider.php:4254
#10: Bitrix\Catalog\Product\CatalogProvider->getAvailableQuantityAndPrice(array)
	/home/bitrix/www/bitrix/modules/sale/lib/internals/transferprovider.php:31
#11: Bitrix\Sale\Internals\TransferProvider->callProviderMethod(string, array)
	/home/bitrix/www/bitrix/modules/sale/lib/internals/transferprovider.php:226
#12: Bitrix\Sale\Internals\TransferProvider->getAvailableQuantityAndPrice(array)
	/home/bitrix/www/bitrix/modules/sale/lib/internals/providerbuilderbase.php:89
#13: Bitrix\Sale\Internals\ProviderBuilderBase->callTransferMethod(string, string)
	/home/bitrix/www/bitrix/modules/sale/lib/internals/providerbuilderbase.php:170
#14: Bitrix\Sale\Internals\ProviderBuilderBase->getAvailableQuantityAndPrice(string)
	/home/bitrix/www/bitrix/modules/sale/lib/internals/providercreator.php:423
#15: Bitrix\Sale\Internals\ProviderCreator->callBuilderMethod(string, string)
	/home/bitrix/www/bitrix/modules/sale/lib/internals/providercreator.php:243
#16: Bitrix\Sale\Internals\ProviderCreator->getAvailableQuantityAndPrice()
	/home/bitrix/www/bitrix/modules/sale/lib/internals/catalog/provider.php:264
#17: Bitrix\Sale\Internals\Catalog\Provider::getAvailableQuantityAndPriceByBasketItem(object, array)
	/home/bitrix/www/bitrix/modules/sale/lib/basketitembase.php:598
#18: Bitrix\Sale\BasketItemBase->onFieldModify(string, double, double)
	/home/bitrix/www/bitrix/modules/sale/lib/basketitem.php:958
#19: Bitrix\Sale\BasketItem->onFieldModify(string, NULL, double)
	/home/bitrix/www/bitrix/modules/sale/lib/internals/entity.php:240
#20: Bitrix\Sale\Internals\Entity->setField(string, double)
	/home/bitrix/www/bitrix/modules/sale/lib/basketitembase.php:375
#21: Bitrix\Sale\BasketItemBase->setField(string, double)
	/home/bitrix/www/bitrix/modules/catalog/lib/product/basket.php:582
#22: Bitrix\Catalog\Product\Basket::add(object, array, array, array)
	/home/bitrix/www/bitrix/modules/catalog/lib/product/basket.php:78
#23: Bitrix\Catalog\Product\Basket::addProduct(array, array)
	/home/bitrix/www/bitrix/modules/catalog/include.php:1545
#24: Add2BasketByProductID(integer, double, array, array)
	/home/bitrix/www/bitrix/php_interface/init.php:101
#25: ChangeMyContent(string)
	/home/bitrix/www/bitrix/modules/main/classes/general/module.php:475
#26: ExecuteModuleEventEx(array, array)
	/home/bitrix/www/bitrix/modules/main/classes/general/main.php:3196
#27: CAllMain->EndBufferContent(string)
	/home/bitrix/www/bitrix/modules/main/classes/general/main.php:3144
#28: CAllMain->EndBufferContentMan()
	/home/bitrix/www/bitrix/modules/main/include/epilog_after.php:36
#29: require(string)
	/home/bitrix/www/bitrix/modules/main/include/epilog.php:3
#30: require_once(string)
	/home/bitrix/www/bitrix/footer.php:4
#31: require(string)
	/home/bitrix/www/catalog/index.php:486
#32: include_once(string)
	/home/bitrix/www/bitrix/modules/main/include/urlrewrite.php:159
#33: include_once(string)
	/home/bitrix/www/bitrix/urlrewrite.php:2