Hello,
First, I am french; sorry if my english is bad.
I create a site in Prestashop on a Qnap TS-212 and I need to launch an operation (generating some declinations from 7 attributes and 37 values) that takes more than an hour.
Off after an hour, I receive an error message that tells me that the maximum execution time of the operation
is reached and the operation is stopped.
I try to find the value to change myself by changing or adding timeouts in PHP, MySQL, APache
Now, even though it tells me that the timeout is 3600 seconds, it turns over an hour and a half
and timeout message tells me that the problem comes from a line in the file DbPDO.php to
line 101. Here is the line:
94 /**
95 * @see DbCore::nextRow()
96 */
97 public function nextRow($result = false)
98 {
99 if (!$result)
100 $result = $this->result;
101 return $result->fetch(PDO::FETCH_ASSOC);
102 }
I do not know what to change in this line or whether to change something else.
Thanks per advanced for your help.
timeout in generating some declinations
-
- Know my way around
- Posts: 132
- Joined: Thu Jan 30, 2014 9:29 pm
-
- Know my way around
- Posts: 132
- Joined: Thu Jan 30, 2014 9:29 pm
Re: timeout in generating some declinations
I have set PHP to Safe Mode and the operation has run for 24 hours
It did finished with this error page :
[PrestaShopDatabaseException]
Incorrect key file for table '/tmp/#sql_16fd_0.MYI'; try to repair it
SELECT ag.`id_attribute_group`, ag.`is_color_group`, agl.`name` AS group_name, agl.`public_name` AS public_group_name,
a.`id_attribute`, al.`name` AS attribute_name, a.`color` AS attribute_color, product_attribute_shop.`id_product_attribute`,
IFNULL(stock.quantity, 0) as quantity, product_attribute_shop.`price`, product_attribute_shop.`ecotax`, product_attribute_shop.`weight`,
product_attribute_shop.`default_on`, pa.`reference`, product_attribute_shop.`unit_price_impact`,
product_attribute_shop.`minimal_quantity`, product_attribute_shop.`available_date`, ag.`group_type`
FROM `ps_product_attribute` pa
INNER JOIN ps_product_attribute_shop product_attribute_shop
ON (product_attribute_shop.id_product_attribute = pa.id_product_attribute AND product_attribute_shop.id_shop = 1)
LEFT
JOIN ps_stock_available stock
ON (stock.id_product = pa.id_product AND stock.id_product_attribute = IFNULL(`pa`.id_product_attribute, 0) AND stock.id_shop = 1 )
LEFT JOIN `ps_product_attribute_combination` pac ON (pac.`id_product_attribute` = pa.`id_product_attribute`)
LEFT JOIN `ps_attribute` a ON (a.`id_attribute` = pac.`id_attribute`)
LEFT JOIN `ps_attribute_group` ag ON (ag.`id_attribute_group` = a.`id_attribute_group`)
LEFT JOIN `ps_attribute_lang` al ON (a.`id_attribute` = al.`id_attribute`)
LEFT JOIN `ps_attribute_group_lang` agl ON (ag.`id_attribute_group` = agl.`id_attribute_group`)
INNER JOIN ps_attribute_shop attribute_shop
ON (attribute_shop.id_attribute = a.id_attribute AND attribute_shop.id_shop = 1)
WHERE pa.`id_product` = 25
AND al.`id_lang` = 1
AND agl.`id_lang` = 1
GROUP BY id_attribute_group, id_product_attribute
ORDER BY ag.`position` ASC, a.`position` ASC, agl.`name` ASC
at line 613 in file classes/db/Db.php
607. WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
608. }
609. else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))
610. {
611. if ($sql)
612. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
613. throw new PrestaShopDatabaseException($this->getMsgError());
614. }
615. }
616.
617. /**
DbCore->displayError - [line 313 - classes/db/Db.php] - [1 Arguments]
DbCore->query - [line 488 - classes/db/Db.php] - [1 Arguments]
DbCore->executeS - [line 3100 - classes/Product.php] - [1 Arguments]
ProductCore->getAttributesGroups - [line 201 - controllers/admin/AdminAttributeGeneratorController.php] - [1 Arguments]
AdminAttributeGeneratorControllerCore->initGroupTable - [line 243 - controllers/admin/AdminAttributeGeneratorController.php] - [0 Argument]
AdminAttributeGeneratorControllerCore->initContent - [line 167 - classes/controller/Controller.php] - [0 Argument]
ControllerCore->run - [line 348 - classes/Dispatcher.php] - [0 Argument]
DispatcherCore->dispatch - [line 53 - admin4246/index.php] - [0 Argument]
It did finished with this error page :
[PrestaShopDatabaseException]
Incorrect key file for table '/tmp/#sql_16fd_0.MYI'; try to repair it
SELECT ag.`id_attribute_group`, ag.`is_color_group`, agl.`name` AS group_name, agl.`public_name` AS public_group_name,
a.`id_attribute`, al.`name` AS attribute_name, a.`color` AS attribute_color, product_attribute_shop.`id_product_attribute`,
IFNULL(stock.quantity, 0) as quantity, product_attribute_shop.`price`, product_attribute_shop.`ecotax`, product_attribute_shop.`weight`,
product_attribute_shop.`default_on`, pa.`reference`, product_attribute_shop.`unit_price_impact`,
product_attribute_shop.`minimal_quantity`, product_attribute_shop.`available_date`, ag.`group_type`
FROM `ps_product_attribute` pa
INNER JOIN ps_product_attribute_shop product_attribute_shop
ON (product_attribute_shop.id_product_attribute = pa.id_product_attribute AND product_attribute_shop.id_shop = 1)
LEFT
JOIN ps_stock_available stock
ON (stock.id_product = pa.id_product AND stock.id_product_attribute = IFNULL(`pa`.id_product_attribute, 0) AND stock.id_shop = 1 )
LEFT JOIN `ps_product_attribute_combination` pac ON (pac.`id_product_attribute` = pa.`id_product_attribute`)
LEFT JOIN `ps_attribute` a ON (a.`id_attribute` = pac.`id_attribute`)
LEFT JOIN `ps_attribute_group` ag ON (ag.`id_attribute_group` = a.`id_attribute_group`)
LEFT JOIN `ps_attribute_lang` al ON (a.`id_attribute` = al.`id_attribute`)
LEFT JOIN `ps_attribute_group_lang` agl ON (ag.`id_attribute_group` = agl.`id_attribute_group`)
INNER JOIN ps_attribute_shop attribute_shop
ON (attribute_shop.id_attribute = a.id_attribute AND attribute_shop.id_shop = 1)
WHERE pa.`id_product` = 25
AND al.`id_lang` = 1
AND agl.`id_lang` = 1
GROUP BY id_attribute_group, id_product_attribute
ORDER BY ag.`position` ASC, a.`position` ASC, agl.`name` ASC
at line 613 in file classes/db/Db.php
607. WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
608. }
609. else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))
610. {
611. if ($sql)
612. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
613. throw new PrestaShopDatabaseException($this->getMsgError());
614. }
615. }
616.
617. /**
DbCore->displayError - [line 313 - classes/db/Db.php] - [1 Arguments]
DbCore->query - [line 488 - classes/db/Db.php] - [1 Arguments]
DbCore->executeS - [line 3100 - classes/Product.php] - [1 Arguments]
ProductCore->getAttributesGroups - [line 201 - controllers/admin/AdminAttributeGeneratorController.php] - [1 Arguments]
AdminAttributeGeneratorControllerCore->initGroupTable - [line 243 - controllers/admin/AdminAttributeGeneratorController.php] - [0 Argument]
AdminAttributeGeneratorControllerCore->initContent - [line 167 - classes/controller/Controller.php] - [0 Argument]
ControllerCore->run - [line 348 - classes/Dispatcher.php] - [0 Argument]
DispatcherCore->dispatch - [line 53 - admin4246/index.php] - [0 Argument]