Closed stammmedia closed 9 years ago
you are not saving 180k products, only few, you need to run some profiler or strace your failing php process to see where is the loop/crack
Please note this problem only occurs, when varnish cache is enabled in backend. Also turning of the observers in the config of Turpentine for the product savings solved the php memory size error when saving a product item, of course than the sites in cache with this product are still old.
Before the cash at product saving, this is the last debug info:
SQL: SELECT catalog_category_flat_store_3
.* FROM catalog_category_flat_store_3
WHERE (catalog_category_flat_store_3
.entity_id
=3)
AFF: 1
TIME: 0.0002
TRACE: #1 Magento_Db_Adapter_Pdo_Mysql[Varien_Db_Adapter_Pdo_Mysql]#000000004aa0d98b000000005e4dd962#->debugStat(2, 'SELECT `catalog...', array(), &Varien_Db_Statement_Pdo_Mysql#000000004aa0daf1000000005e4dd962#) called at [lib/Varien/Db/Adapter/Pdo/Mysql.php:433]
This message comes about fiveteen times with different flat_store numbers and different entry_id
This is the lastd ebug log before crashing when cache tries to clear at Varnish pages:
SQL: SELECT e
._, cat_index
.position
AS cat_index_position
, IF(at_visibility.value_id > 0, at_visibility.value, at_visibility_default.value) AS visibility
FROM catalog_product_entity
AS e
INNER JOIN catalog_category_product_index
AS cat_index
ON cat_index.product_id=e.entity_id AND cat_index.store_id=2 AND cat_index.category_id = '2'
INNER JOIN catalog_product_entity_int
AS at_visibility_default
ON (at_visibility_default
.entity_id
= e
.entity_id
) AND (at_visibility_default
.attribute_id
= '102') AND at_visibility_default
.store_id
= 0
LEFT JOIN catalog_product_entity_int
AS at_visibility
ON (at_visibility
.entity_id
= e
.entity_id
) AND (at_visibility
.attribute_id
= '102') AND (at_visibility
.store_id
= 2) WHERE (((IF(at_visibility.value_id > 0, at_visibility.value, at_visibility_default.value) = '4') OR (IF(at_visibility.value_id > 0, at_visibility.value, at_visibility_default.value) = '2')))
AFF: 174773
TIME: 1.6714
TRACE: #1 Magento_Db_Adapter_Pdo_Mysql[Varien_Db_Adapter_Pdo_Mysql]#0000000027e4bb9f000000007cac1d57#->debugStat(2, 'SELECT e
., `c...', array(), &Varien_Db_Statement_Pdo_Mysql#0000000027e4b911000000007cac1d57#) called at [lib/Varien/Db/Adapter/Pdo/Mysql.php:433]
e
.*,`c...', array()) called at [lib/Zend/Db/Adapter/Abstract.php:737]e
., `c...', array()) called at [lib/Varien/Data/Collection/Db.php:734]e
., `c...') called at [app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php:1045]Does this help?
I solved the problem. I disabled the lines 169 to 175 in Cron.php function getAllUrls(). After that it worked.
I got an error of PHP memory size when I save a product and when I refresh the Varnish page cache:
For the page cache for example: FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes) in /export/www/xtwostore/htdocs/magento/lib/Zend/Db/Statement/Pdo.php on line 291" while reading response header from upstream, client: 127.0.0.1, server: [...]
Already set memory to 4GB but no success.... seem it goes to endless.
We already could figure out that for product saving the oberserver seem to do something that need much memory, maybe due to very much products in our shop (3 multistores with 180.000 products).
Please let me know if there is a solution.
Thank you!