MySQL Query Error: SELECT CAT_P1.ID as CATALOG_PRICE_ID_1, CAT_P1.CATALOG_GROUP_ID as CATALOG_GROUP_ID_1, CAT_P1.PRICE as CATALOG_PRICE_1, CAT_P1.CURRENCY as CATALOG_CURRENCY_1, CAT_P1.QUANTITY_FROM as CATALOG_QUANTITY_FROM_1, CAT_P1.QUANTITY_TO as CATALOG_QUANTITY_TO_1, 'Розничная цена' as CATALOG_GROUP_NAME_1, 'Y' as CATALOG_CAN_ACCESS_1, 'Y' as CATALOG_CAN_BUY_1, CAT_P1.EXTRA_ID as CATALOG_EXTRA_ID_1, CAT_P2.ID as CATALOG_PRICE_ID_2, CAT_P2.CATALOG_GROUP_ID as CATALOG_GROUP_ID_2, CAT_P2.PRICE as CATALOG_PRICE_2, CAT_P2.CURRENCY as CATALOG_CURRENCY_2, CAT_P2.QUANTITY_FROM as CATALOG_QUANTITY_FROM_2, CAT_P2.QUANTITY_TO as CATALOG_QUANTITY_TO_2, 'Мелкий опт' as CATALOG_GROUP_NAME_2, 'Y' as CATALOG_CAN_ACCESS_2, 'N' as CATALOG_CAN_BUY_2, CAT_P2.EXTRA_ID as CATALOG_EXTRA_ID_2, CAT_P3.ID as CATALOG_PRICE_ID_3, CAT_P3.CATALOG_GROUP_ID as CATALOG_GROUP_ID_3, CAT_P3.PRICE as CATALOG_PRICE_3, CAT_P3.CURRENCY as CATALOG_CURRENCY_3, CAT_P3.QUANTITY_FROM as CATALOG_QUANTITY_FROM_3, CAT_P3.QUANTITY_TO as CATALOG_QUANTITY_TO_3, 'Средний опт' as CATALOG_GROUP_NAME_3, 'Y' as CATALOG_CAN_ACCESS_3, 'N' as CATALOG_CAN_BUY_3, CAT_P3.EXTRA_ID as CATALOG_EXTRA_ID_3, CAT_P4.ID as CATALOG_PRICE_ID_4, CAT_P4.CATALOG_GROUP_ID as CATALOG_GROUP_ID_4, CAT_P4.PRICE as CATALOG_PRICE_4, CAT_P4.CURRENCY as CATALOG_CURRENCY_4, CAT_P4.QUANTITY_FROM as CATALOG_QUANTITY_FROM_4, CAT_P4.QUANTITY_TO as CATALOG_QUANTITY_TO_4, 'Крупный опт' as CATALOG_GROUP_NAME_4, 'Y' as CATALOG_CAN_ACCESS_4, 'N' as CATALOG_CAN_BUY_4, CAT_P4.EXTRA_ID as CATALOG_EXTRA_ID_4, CAT_PR.QUANTITY as CATALOG_QUANTITY, CAT_PR.QUANTITY_RESERVED as CATALOG_QUANTITY_RESERVED, IF (CAT_PR.QUANTITY_TRACE = 'D', 'N', CAT_PR.QUANTITY_TRACE) as CATALOG_QUANTITY_TRACE, CAT_PR.QUANTITY_TRACE as CATALOG_QUANTITY_TRACE_ORIG, IF (CAT_PR.CAN_BUY_ZERO = 'D', 'Y', CAT_PR.CAN_BUY_ZERO) as CATALOG_CAN_BUY_ZERO, CAT_PR.CAN_BUY_ZERO as CATALOG_CAN_BUY_ZERO_ORIG, IF (CAT_PR.NEGATIVE_AMOUNT_TRACE = 'D', 'Y', CAT_PR.NEGATIVE_AMOUNT_TRACE) as CATALOG_NEGATIVE_AMOUNT_TRACE, CAT_PR.NEGATIVE_AMOUNT_TRACE as CATALOG_NEGATIVE_AMOUNT_ORIG, IF (CAT_PR.SUBSCRIBE = 'D', 'Y', CAT_PR.SUBSCRIBE) as CATALOG_SUBSCRIBE, CAT_PR.SUBSCRIBE as CATALOG_SUBSCRIBE_ORIG, CAT_PR.AVAILABLE as CATALOG_AVAILABLE, CAT_PR.WEIGHT as CATALOG_WEIGHT, CAT_PR.WIDTH as CATALOG_WIDTH, CAT_PR.LENGTH as CATALOG_LENGTH, CAT_PR.HEIGHT as CATALOG_HEIGHT, CAT_PR.MEASURE as CATALOG_MEASURE, CAT_VAT.RATE as CATALOG_VAT, CAT_PR.VAT_ID as CATALOG_VAT_ID, CAT_PR.VAT_INCLUDED as CATALOG_VAT_INCLUDED, CAT_PR.PRICE_TYPE as CATALOG_PRICE_TYPE, CAT_PR.RECUR_SCHEME_TYPE as CATALOG_RECUR_SCHEME_TYPE, CAT_PR.RECUR_SCHEME_LENGTH as CATALOG_RECUR_SCHEME_LENGTH, CAT_PR.TRIAL_PRICE_ID as CATALOG_TRIAL_PRICE_ID, CAT_PR.WITHOUT_ORDER as CATALOG_WITHOUT_ORDER, CAT_PR.SELECT_BEST_PRICE as CATALOG_SELECT_BEST_PRICE, CAT_PR.PURCHASING_PRICE as CATALOG_PURCHASING_PRICE, CAT_PR.PURCHASING_CURRENCY as CATALOG_PURCHASING_CURRENCY, CAT_PR.TYPE as CATALOG_TYPE, CAT_PR.BUNDLE as CATALOG_BUNDLE FROM b_iblock B INNER JOIN b_lang L ON B.LID=L.LID INNER JOIN b_iblock_element BE ON BE.IBLOCK_ID = B.ID INNER JOIN ( SELECT DISTINCT BSE.IBLOCK_ELEMENT_ID FROM b_iblock_section_element BSE INNER JOIN b_iblock_section BSubS ON BSE.IBLOCK_SECTION_ID = BSubS.ID INNER JOIN b_iblock_section BS ON (BSubS.IBLOCK_ID=BS.IBLOCK_ID AND BSubS.LEFT_MARGIN>=BS.LEFT_MARGIN AND BSubS.RIGHT_MARGIN<=BS.RIGHT_MARGIN) WHERE ((BS.ID IN (6643))) ) BES ON BES.IBLOCK_ELEMENT_ID = BE.ID left join b_catalog_price CAT_P1 on (CAT_P1.PRODUCT_ID = BE.ID AND CAT_P1.CATALOG_GROUP_ID = 1) left join b_catalog_price CAT_P2 on (CAT_P2.PRODUCT_ID = BE.ID AND CAT_P2.CATALOG_GROUP_ID = 2) left join b_catalog_price CAT_P3 on (CAT_P3.PRODUCT_ID = BE.ID AND CAT_P3.CATALOG_GROUP_ID = 3) left join b_catalog_price CAT_P4 on (CAT_P4.PRODUCT_ID = BE.ID AND CAT_P4.CATALOG_GROUP_ID = 4) left join b_catalog_product CAT_PR on (CAT_PR.ID = BE.ID) left join b_catalog_iblock CAT_IB on ((CAT_PR.VAT_ID IS NULL OR CAT_PR.VAT_ID = 0) AND CAT_IB.IBLOCK_ID = BE.IBLOCK_ID) left join b_catalog_vat CAT_VAT on (CAT_VAT.ID = IF((CAT_PR.VAT_ID IS NULL OR CAT_PR.VAT_ID = 0), CAT_IB.VAT_ID, CAT_PR.VAT_ID)) WHERE 1=1 AND ( ((((BE.IBLOCK_ID = '1')))) ) AND (((BE.WF_STATUS_ID=1 AND BE.WF_PARENT_ELEMENT_ID IS NULL))) ORDER BY length(CAT_P4.PRICE_SCALE)>0 desc, CAT_P4.PRICE_SCALE asc , length(CAT_P1.PRICE_SCALE)>0 desc, CAT_P1.PRICE_SCALE asc , length(CAT_P2.PRICE_SCALE)>0 desc, CAT_P2.PRICE_SCALE asc , length(CAT_P3.PRICE_SCALE)>0 desc, CAT_P3.PRICE_SCALE asc LIMIT 1 [[2006] MySQL server has gone away]

DB query error.
Please try later.





Fatal error: Uncaught Bitrix\Main\DB\SqlQueryException: Mysql query error: (2006) MySQL server has gone away 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`sale_...', Array, Object(Bitrix\Main\Diag\SqlTrackerQuery)) #1 /home/bitrix/www/bitrix/modules/main/lib/orm/query/query.php(3193): Bitrix\Main\DB\Connection->query('SELECT \n\t`sale_...') #2 /home/bitrix/www/bitrix/modules/main/lib/orm/query/query.php(806): Bitrix\Main\ORM\Query\Query->query('SELECT \n\t`sale_...') #3 /home/bitrix/www/bitrix/modules/main/lib/orm/data/datamanager.php(457): Bitrix\Main\ORM\Query\Query->exec() #4 /home/bitrix/www/bitrix/modules/pecom.ecomm/classes/lib/Bitrix/Handler/deliveries.php(69): Bitrix\Main\ORM\Data\DataManager::getList(Array) #5 /home/bitrix/www/bitrix/modules/pecom.ecomm/classes/lib/Bitrix/Handler/deliveries.php(77): Ipolh\Pecom\Bitrix\Handler\deliveries::getDelivery in /home/bitrix/www/bitrix/modules/main/lib/db/mysqliconnection.php on line 137