Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDOException: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock #9300

Closed
ooples opened this issue Apr 18, 2017 · 5 comments
Assignees
Labels
Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed

Comments

@ooples
Copy link

ooples commented Apr 18, 2017

I started seeing this error message only after I upgraded to magento 2.1.6 and I'm not sure what to do to fix this. I notice this issue on running a reindex on catalog search with a catalog over 10k products. Using flat category and products and using elastic search.

Preconditions

  1. Magento 2.1.6
  2. Php 7.0.17

Steps to reproduce

  1. Run reindex job on catalog search index

Expected result

  1. No lock

Actual result

  1. [Screenshot, logs]
    [2017-04-18 15:00:27] main.CRITICAL: PDOException: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction in /var/www/html/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:228
    Stack trace:
    #0 /var/www/html/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
    Can you commit to repository a folder dev/tests/static ? #1 /var/www/html/vendor/magento/framework/DB/Statement/Pdo/Mysql.php(95): Zend_Db_Statement_Pdo->_execute(Array)
    BUG FIX - Uncaught exception when accessing admin with none existent use... #2 /var/www/html/vendor/magento/zendframework1/library/Zend/Db/Statement.php(303): Magento\Framework\DB\Statement\Pdo\Mysql->_execute(Array)
    __DIR__ Typo fixed #3 /var/www/html/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
    Enable Magento_Profiler by SetEnv #4 /var/www/html/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO re...', Array) #5 /var/www/html/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(465): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO re...', Array)
    Why use private for message ? #6 /var/www/html/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(520): Magento\Framework\DB\Adapter\Pdo\Mysql->_query('INSERT INTO re...', Array) #7 /var/www/html/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(1866): Magento\Framework\DB\Adapter\Pdo\Mysql->query('INSERT INTO re...', Array)
    Clear separation for Controller and controllers required with Full Controller path #8 /var/www/html/vendor/magento/module-reports/Model/ResourceModel/Helper.php(36): Magento\Framework\DB\Adapter\Pdo\Mysql->insertOnDuplicate('report_viewed_p...', Array, Array)
    Added: dispatchEvent to deleteAction(). Only existed in massDeleteAction(). #9 /var/www/html/vendor/magento/module-reports/Model/ResourceModel/Product/Index/AbstractIndex.php(140): Magento\Reports\Model\ResourceModel\Helper->mergeVisitorProductIndex('report_viewed_p...', Array, Array)
    Merged JS/CSS improvements #10 /var/www/html/vendor/magento/framework/Model/AbstractModel.php(631): Magento\Reports\Model\ResourceModel\Product\Index\AbstractIndex->save(Object(Magento\Reports\Model\Product\Index\Viewed))
    Design suggestion for cross browser compitablity #11 /var/www/html/vendor/magento/module-reports/Observer/CatalogProductViewObserver.php(79): Magento\Framework\Model\AbstractModel->save()
    core/template block should use a helper or a model #12 /var/www/html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(73): Magento\Reports\Observer\CatalogProductViewObserver->execute(Object(Magento\Framework\Event\Observer))
    Performance Testing #13 /var/www/html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(61): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Magento\Reports\Observer\CatalogProductViewObserver), Object(Magento\Framework\Event\Observer))
    Adding dispatch of an event before and after applyAllUpdates() #14 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(146): Magento\Framework\Event\Invoker\InvokerDefault->dispatch(Array, Object(Magento\Framework\Event\Observer))
    Decrease dependencies from Mage class #15 /var/www/html/var/generation/Magento/Framework/Event/Invoker/InvokerDefault/Interceptor.php(26): Magento\Framework\Event\Invoker\InvokerDefault\Interceptor->___callPlugins('dispatch', Array, Array)
    Block must know nothing about his parent #16 /var/www/html/vendor/magento/framework/Event/Manager.php(66): Magento\Framework\Event\Invoker\InvokerDefault\Interceptor->dispatch(Array, Object(Magento\Framework\Event\Observer))
    Move validation of Mage_Customer_Model_Address to another class #17 /var/www/html/var/generation/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch('catalog_control...', Array)
    MCACE-136 - Catalog API call assignProduct does not pass $identifierType... #18 /var/www/html/vendor/magento/module-catalog/Helper/Product/View.php(226): Magento\Framework\Event\Manager\Proxy->dispatch('catalog_control...', Array)
    Allow module dependencies to not be "hard" dependencies. #19 /var/www/html/vendor/magento/module-catalog/Controller/Product/View.php(109): Magento\Catalog\Helper\Product\View->prepareAndRender(Object(Magento\Framework\View\Result\Page\Interceptor), 6217, Object(Magento\Catalog\Controller\Product\View\Interceptor), Object(Magento\Framework\DataObject))
    Can not import product by System -> Import/Export -> Dataflow - Profiles -> Import All Products #20 /var/www/html/var/generation/Magento/Catalog/Controller/Product/View/Interceptor.php(24): Magento\Catalog\Controller\Product\View->execute()
    Unable to locate skin file pub/js/css/reset.css #21 /var/www/html/vendor/magento/framework/App/Action/Action.php(102): Magento\Catalog\Controller\Product\View\Interceptor->execute()
    Reorganize resources/setup files #22 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
    Errors at reports > product > most viewed #23 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Catalog\Controller\Product\View\Interceptor->___callParent('dispatch', Array)
    Remove var Translator = new Translate... from every page #24 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Catalog...', 'dispatch', Object(Magento\Catalog\Controller\Product\View\Interceptor), Array, 'contextPlugin')
    Rename Mage_Core_Block_Abstract::getHelper #25 /var/www/html/vendor/magento/module-store/App/Action/Plugin/Context.php(106): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))
    Mage_Core_Block_Abstract::__() use singleton for expr var #26 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Store\App\Action\Plugin\Context->aroundDispatch(Object(Magento\Catalog\Controller\Product\View\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
    Comment improved. #27 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Catalog...', 'dispatch', Object(Magento\Catalog\Controller\Product\View\Interceptor), Array, 'customer-app-ac...')
    Added removeLink method. #28 /var/www/html/vendor/magento/module-customer/Model/App/Action/ContextPlugin.php(61): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))
    Use Flyweight pattern for blocks in layout updates #29 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Customer\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Catalog\Controller\Product\View\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
    Error happenes when installation #30 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Catalog...', 'dispatch', Object(Magento\Catalog\Controller\Product\View\Interceptor), Array, 'storeCheck')
    Create Setup class with possibility to create tables with translatable fields #31 /var/www/html/vendor/magento/module-store/App/Action/Plugin/StoreCheck.php(44): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))
    Mage Captcha #32 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Store\App\Action\Plugin\StoreCheck->aroundDispatch(Object(Magento\Catalog\Controller\Product\View\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
    Add display mode for categoty #33 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Catalog...', 'dispatch', Object(Magento\Catalog\Controller\Product\View\Interceptor), Array, 'weee-app-action...')
    Catalog product price rules should be moved to controller/model #34 /var/www/html/vendor/magento/module-weee/Model/App/Action/ContextPlugin.php(112): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))
    What is the use of Mage_Core_Block_Flush ? #35 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Weee\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Catalog\Controller\Product\View\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
    Possibility to force catalog prices include or exclude tax #36 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Catalog...', 'dispatch', Object(Magento\Catalog\Controller\Product\View\Interceptor), Array, 'tax-app-action-...')
    Add method to prevent sending of response after action completes #37 /var/www/html/vendor/magento/module-tax/Model/App/Action/ContextPlugin.php(91): Magento\Catalog\Controller\Product\View\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))
    Move saving logic outside the View part #38 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Tax\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Catalog\Controller\Product\View\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
    Have you heard of Composer ? #39 /var/www/html/var/generation/Magento/Catalog/Controller/Product/View/Interceptor.php(39): Magento\Catalog\Controller\Product\View\Interceptor->___callPlugins('dispatch', Array, Array)
    Fix _forward secret key matching expects standard router matching #40 /var/www/html/vendor/magento/framework/App/FrontController.php(55): Magento\Catalog\Controller\Product\View\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
    Environment based local.xml merging #41 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
    Add events to transactional email sending #42 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
    Added logging of executed setup files #43 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'requestPreproce...')
    Added support for logging to php://output #44 /var/www/html/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(94): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))
    Don't encode email subject if not necessary. #45 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
    Patch for code that is not following best practices in Magento development #46 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install')
    Grid Massaction Bandwidth Usage of setGridIds #47 /var/www/html/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))
    Patch for code that is not following best practices in Magento development #48 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
    Fix of wrong ordering logic for totals #49 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'searchautocompl...')
    Test Issue #50 /var/www/html/vendor/mirasvit/module-search-autocomplete/src/SearchAutocomplete/Plugin/ResponsePlugin.php(151): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))
    A problem of Manage Categories #51 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(67): Mirasvit\SearchAutocomplete\Plugin\ResponsePlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
    Add @var $this comments to templates #52 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'front-controlle...')
    Missing closing tag in New Order email template #53 /var/www/html/vendor/magento/module-page-cache/Model/App/FrontController/VarnishPlugin.php(55): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))
    Added support for modules configuration per environment #54 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\PageCache\Model\App\FrontController\VarnishPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
    String based error handling in Mage_Sales_Model_Quote:addProductAdvanced etc. #55 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'front-controlle...')
    Update app/design/frontend/default/modern/skin/default/css/styles.css #56 /var/www/html/vendor/mirasvit/module-seo/src/Seo/Plugin/Event/BuiltinPlugin.php(109): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))
    Change Mage::getModel(%Class_Name%) to %Class_Name%::new() #57 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(142): Mirasvit\Seo\Plugin\Event\BuiltinPlugin->aroundAroundDispatch(Object(Magento\PageCache\Model\App\FrontController\BuiltinPlugin\Interceptor), Object(Closure), Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
    Default libraries in Magento #58 /var/www/html/var/generation/Magento/PageCache/Model/App/FrontController/BuiltinPlugin/Interceptor.php(26): Magento\PageCache\Model\App\FrontController\BuiltinPlugin\Interceptor->___callPlugins('aroundDispatch', Array, Array)
    Prevent dashboard from generating a bunch of reports when Google Charts API is unavailable #59 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(142): Magento\PageCache\Model\App\FrontController\BuiltinPlugin\Interceptor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
    Why don't getAllIds() of Mage_Core_Model_Resource_Db_Collection_Abstract bind params? #60 /var/www/html/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
    Fix issue with Mage/GoogleCheckout reference in Mage/Sales module #61 /var/www/html/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
    Validation change for Text type EAV attributes #62 /var/www/html/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
    Passing args node value to observer object #63 /var/www/html/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
    Validation change for Text type EAV attributes #64 {main}

Next Zend_Db_Statement_Exception: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction, query was: INSERT INTO report_viewed_product_index (visitor_id,product_id,store_id) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE visitor_id = VALUES(visitor_id), product_id = VALUES(product_id), store_id = VALUES(store_id) in /var/www/html/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:235
Stack trace:
#0 /var/www/html/vendor/magento/framework/DB/Statement/Pdo/Mysql.php(95): Zend_Db_Statement_Pdo->_execute(Array)
#1 /var/www/html/vendor/magento/zendframework1/library/Zend/Db/Statement.php(303): Magento\Framework\DB\Statement\Pdo\Mysql->_execute(Array)
#2 /var/www/html/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /var/www/html/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO re...', Array) #4 /var/www/html/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(465): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO re...', Array)
#5 /var/www/html/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(520): Magento\Framework\DB\Adapter\Pdo\Mysql->_query('INSERT INTO re...', Array) #6 /var/www/html/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(1866): Magento\Framework\DB\Adapter\Pdo\Mysql->query('INSERT INTO re...', Array)
#7 /var/www/html/vendor/magento/module-reports/Model/ResourceModel/Helper.php(36): Magento\Framework\DB\Adapter\Pdo\Mysql->insertOnDuplicate('report_viewed_p...', Array, Array)
#8 /var/www/html/vendor/magento/module-reports/Model/ResourceModel/Product/Index/AbstractIndex.php(140): Magento\Reports\Model\ResourceModel\Helper->mergeVisitorProductIndex('report_viewed_p...', Array, Array)
#9 /var/www/html/vendor/magento/framework/Model/AbstractModel.php(631): Magento\Reports\Model\ResourceModel\Product\Index\AbstractIndex->save(Object(Magento\Reports\Model\Product\Index\Viewed))
#10 /var/www/html/vendor/magento/module-reports/Observer/CatalogProductViewObserver.php(79): Magento\Framework\Model\AbstractModel->save()
#11 /var/www/html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(73): Magento\Reports\Observer\CatalogProductViewObserver->execute(Object(Magento\Framework\Event\Observer))
#12 /var/www/html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(61): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Magento\Reports\Observer\CatalogProductViewObserver), Object(Magento\Framework\Event\Observer))
#13 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(146): Magento\Framework\Event\Invoker\InvokerDefault->dispatch(Array, Object(Magento\Framework\Event\Observer))
#14 /var/www/html/var/generation/Magento/Framework/Event/Invoker/InvokerDefault/Interceptor.php(26): Magento\Framework\Event\Invoker\InvokerDefault\Interceptor->___callPlugins('dispatch', Array, Array)
#15 /var/www/html/vendor/magento/framework/Event/Manager.php(66): Magento\Framework\Event\Invoker\InvokerDefault\Interceptor->dispatch(Array, Object(Magento\Framework\Event\Observer))
#16 /var/www/html/var/generation/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch('catalog_control...', Array)
#17 /var/www/html/vendor/magento/module-catalog/Helper/Product/View.php(226): Magento\Framework\Event\Manager\Proxy->dispatch('catalog_control...', Array)
#18 /var/www/html/vendor/magento/module-catalog/Controller/Product/View.php(109): Magento\Catalog\Helper\Product\View->prepareAndRender(Object(Magento\Framework\View\Result\Page\Interceptor), 6217, Object(Magento\Catalog\Controller\Product\View\Interceptor), Object(Magento\Framework\DataObject))
#19 /var/www/html/var/generation/Magento/Catalog/Controller/Product/View/Interceptor.php(24): Magento\Catalog\Controller\Product\View->execute()
#20 /var/www/html/vendor/magento/framework/App/Action/Action.php(102): Magento\Catalog\Controller\Product\View\Interceptor->execute()
#21 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#22 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Catalog\Controller\Product\View\Interceptor->___callParent('dispatch', Array)
#23 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Catalog...', 'dispatch', Object(Magento\Catalog\Controller\Product\View\Interceptor), Array, 'contextPlugin')
#24 /var/www/html/vendor/magento/module-store/App/Action/Plugin/Context.php(106): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))
#25 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Store\App\Action\Plugin\Context->aroundDispatch(Object(Magento\Catalog\Controller\Product\View\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#26 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Catalog...', 'dispatch', Object(Magento\Catalog\Controller\Product\View\Interceptor), Array, 'customer-app-ac...')
#27 /var/www/html/vendor/magento/module-customer/Model/App/Action/ContextPlugin.php(61): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))
#28 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Customer\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Catalog\Controller\Product\View\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#29 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Catalog...', 'dispatch', Object(Magento\Catalog\Controller\Product\View\Interceptor), Array, 'storeCheck')
#30 /var/www/html/vendor/magento/module-store/App/Action/Plugin/StoreCheck.php(44): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))
#31 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Store\App\Action\Plugin\StoreCheck->aroundDispatch(Object(Magento\Catalog\Controller\Product\View\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#32 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Catalog...', 'dispatch', Object(Magento\Catalog\Controller\Product\View\Interceptor), Array, 'weee-app-action...')
#33 /var/www/html/vendor/magento/module-weee/Model/App/Action/ContextPlugin.php(112): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))
#34 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Weee\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Catalog\Controller\Product\View\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#35 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Catalog...', 'dispatch', Object(Magento\Catalog\Controller\Product\View\Interceptor), Array, 'tax-app-action-...')
#36 /var/www/html/vendor/magento/module-tax/Model/App/Action/ContextPlugin.php(91): Magento\Catalog\Controller\Product\View\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))
#37 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Tax\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Catalog\Controller\Product\View\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#38 /var/www/html/var/generation/Magento/Catalog/Controller/Product/View/Interceptor.php(39): Magento\Catalog\Controller\Product\View\Interceptor->___callPlugins('dispatch', Array, Array)
#39 /var/www/html/vendor/magento/framework/App/FrontController.php(55): Magento\Catalog\Controller\Product\View\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#40 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#41 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#42 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'requestPreproce...')
#43 /var/www/html/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(94): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))
#44 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#45 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install')
#46 /var/www/html/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))
#47 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#48 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'searchautocompl...')
#49 /var/www/html/vendor/mirasvit/module-search-autocomplete/src/SearchAutocomplete/Plugin/ResponsePlugin.php(151): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))
#50 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(67): Mirasvit\SearchAutocomplete\Plugin\ResponsePlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#51 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'front-controlle...')
#52 /var/www/html/vendor/magento/module-page-cache/Model/App/FrontController/VarnishPlugin.php(55): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))
#53 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\PageCache\Model\App\FrontController\VarnishPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#54 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'front-controlle...')
#55 /var/www/html/vendor/mirasvit/module-seo/src/Seo/Plugin/Event/BuiltinPlugin.php(109): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))
#56 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(142): Mirasvit\Seo\Plugin\Event\BuiltinPlugin->aroundAroundDispatch(Object(Magento\PageCache\Model\App\FrontController\BuiltinPlugin\Interceptor), Object(Closure), Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#57 /var/www/html/var/generation/Magento/PageCache/Model/App/FrontController/BuiltinPlugin/Interceptor.php(26): Magento\PageCache\Model\App\FrontController\BuiltinPlugin\Interceptor->___callPlugins('aroundDispatch', Array, Array)
#58 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(142): Magento\PageCache\Model\App\FrontController\BuiltinPlugin\Interceptor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#59 /var/www/html/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#60 /var/www/html/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#61 /var/www/html/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#62 /var/www/html/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#63 {main} [] []

@southerncomputer
Copy link
Contributor

I suggest disabling any cron-based reindexing and handling it yourself via CLI.

Ideally the index scripts should not run when catalogsearch_fulltext is running and catalogsearch_fulltext should never run until all dependent indexes are complete running. I have all my indexers set to ON_SAVE rather than on_schedule! Partial reindexing never has worked well so I stick to full reindexing during maintenance mode after midnight!

And while that is happening nobody should touch the backend products/categories modules!

What I do is reindex all via CLI in maintenance mode after midnight, and disable all cron-based index jobs except for grid-related ones.

So far this is the only stable way to handle 1.5M products since it takes elasticsearch about 1.2 hours to complete a full reindex plus about 30 minutes for the dependent tables (price/category/eav) to run!

@ooples
Copy link
Author

ooples commented Apr 21, 2017

This is all I have in my crontab file and I believe it said online that it doesn't run the reindex

  •   *       *       *       *       /usr/bin/php /var/www/html/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /var/www/html/var/log/magento.cron.log
    

When I change my indexes to on save it changes all of them to red which I'm assuming is bad?

Also I thought that the 2.1.6 update meant that it no longer ran a full reindex but only a partial one for what it needed to. Is that no correct?

@southerncomputer
Copy link
Contributor

http://devdocs.magento.com/guides/v2.1/config-guide/cli/config-cli-subcommands-index.html

says if they are on schedule - they are run by that single crontab on their own schedule (stores->config->advanced->system) defined in the system settings for the group.

I'm not on 2.1.6 so i can't comment on how the indexers work.

reindex your indexes that are read to have them clear a red status!

I have the first two set to on schedule and the other 15 set to -on-save- and they are all -ready-

@magento-engcom-team magento-engcom-team added G1 Passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed and removed G1 Passed labels Sep 5, 2017
@magento-engcom-team magento-engcom-team added the Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed label Oct 23, 2017
@magento-engcom-team
Copy link
Contributor

@ooples , thank you for your report. Please follow these guidelines for proper tracking of your issue. You can report Commerce-related issues in one of two ways:
You can use the Support portal associated with your account
or
If you are a Partner reporting on behalf of a merchant, use the Partner portal.

GitHub is intended for Magento Open Source users to report on issues related to Open Source only. There are no account management services associated with GitHub.

@Adel-Magebinary
Copy link

why close? still happens in 2.3.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed
Projects
None yet
Development

No branches or pull requests

4 participants