-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
On every monday get the same error in mangeto 2.1.3 #15430
Comments
I had a similar problem with the table 'report_viewed_product_index'. Every time a product was viewed, an event would trigger a database insert to later have statistics of which pages are popular. This was a problem for us, because we run a crawler every day to get our product pages cached using many concurrent web connections. The overload of inserts to the table would cause a small number of pages to get a 404 response with a similar error in our log to what you posted above. I fixed that problem by disabling the 'catalog_controller_product_view' plugin since we don't use Magento's reporting anyway. You probably don't want to disable the customer_visitor inserts since it tells you how many customers are online, etc. Are you being crawled, or is some major spike in traffic happening at that time? Check your logs for anything unusual. Perhaps this is when various reindexing jobs happen which causes the table to temporarily lock and deny inserts. |
Hello AirmanAJK , I have currently schedule cron jobs every 15min so can i set run cron jobs per day then fix the issue.. ? & why the this issue is only for Monday .? Others day site is working properly. Please replay as soon as possible. |
That is not a solution. The cron job only triggers Magento's scheduler to run which itself is responsible for queuing actual work to be done. For example, sending the newsletter doesn't happen every minute, but the cron job lets Magento check every minute to determine when it should be sent. If you look at the table 'cron_schedule', you'll see what jobs are being generated, executed, and their results. I'm guessing your problem is either from external activity (which would be revealed in access/error logs during your downtime, or internally (in which the cron_schedule table might offer some insight). In any case, you definitely want the cron job running every minute as it's responsible for many different tasks like reindexing from change logs, cleaning up old quotes, etc. |
Then what is the proper solution for this. |
That would depend on what the actual problem is. You should not be getting a database lock error when reindexing. Finding out why you are is likely going to require a technical analysis of your logs and database, and possibly even real-time debugging. This is a task suited to a Magento developer, or at least someone with development experience. When problems aren't reproducible on other systems, it's difficult if not impossible to fix through suggestions in a forum like this. |
ok |
Hi @Jaydeepjd i cannot reproduce your scenario steps, can you provide more information? |
@Jaydeepjd , we are closing this issue due to inactivity. If you'd like to update it, please reopen the issue. |
Preconditions
Steps to reproduce
Expected result
Actual result
a:4:{i:0;s:218:"SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction, query was: INSERT INTO
customer_visitor
(customer_id
,session_id
,last_visit_at
) VALUES (?, ?, ?)";i:1;s:14977:"#0 /var/www/vhosts/zirg.com/public/vendor/magento/framework/DB/Statement/Pdo/Mysql.php(95): Zend_Db_Statement_Pdo->_execute(Array)#1 /var/www/vhosts/zirg.com/public/vendor/magento/zendframework1/library/Zend/Db/Statement.php(303): Magento\Framework\DB\Statement\Pdo\Mysql->_execute(Array)
#2 /var/www/vhosts/zirg.com/public/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /var/www/vhosts/zirg.com/public/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO
cu...', Array) #4 /var/www/vhosts/zirg.com/public/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(465): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO
cu...', Array)#5 /var/www/vhosts/zirg.com/public/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(520): Magento\Framework\DB\Adapter\Pdo\Mysql->_query('INSERT INTO
cu...', Array) #6 /var/www/vhosts/zirg.com/public/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(576): Magento\Framework\DB\Adapter\Pdo\Mysql->query('INSERT INTO
cu...', Array)#7 /var/www/vhosts/zirg.com/public/vendor/magento/framework/Model/ResourceModel/Db/AbstractDb.php(759): Zend_Db_Adapter_Abstract->insert('customer_visito...', Array)
#8 /var/www/vhosts/zirg.com/public/vendor/magento/framework/Model/ResourceModel/Db/AbstractDb.php(405): Magento\Framework\Model\ResourceModel\Db\AbstractDb->saveNewObject(Object(Magento\Customer\Model\Visitor))
#9 /var/www/vhosts/zirg.com/public/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\Model\ResourceModel\Db\AbstractDb->save(Object(Magento\Customer\Model\Visitor))
#10 /var/www/vhosts/zirg.com/public/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Customer\Model\ResourceModel\Visitor\Interceptor->___callParent('save', Array)
#11 /var/www/vhosts/zirg.com/public/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Custome...', 'save', Object(Magento\Customer\Model\ResourceModel\Visitor\Interceptor), Array, 'clean_cache')
#12 /var/www/vhosts/zirg.com/public/vendor/magento/framework/App/Cache/FlushCacheByTags.php(71): Magento\Customer\Model\ResourceModel\Visitor\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Customer\Model\Visitor))
#13 /var/www/vhosts/zirg.com/public/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Framework\App\Cache\FlushCacheByTags->aroundSave(Object(Magento\Customer\Model\ResourceModel\Visitor\Interceptor), Object(Closure), Object(Magento\Customer\Model\Visitor))
#14 /var/www/vhosts/zirg.com/public/var/generation/Magento/Customer/Model/ResourceModel/Visitor/Interceptor.php(104): Magento\Customer\Model\ResourceModel\Visitor\Interceptor->___callPlugins('save', Array, Array)
#15 /var/www/vhosts/zirg.com/public/vendor/magento/framework/Model/AbstractModel.php(631): Magento\Customer\Model\ResourceModel\Visitor\Interceptor->save(Object(Magento\Customer\Model\Visitor))
#16 /var/www/vhosts/zirg.com/public/vendor/magento/module-customer/Model/Visitor.php(160): Magento\Framework\Model\AbstractModel->save()
#17 /var/www/vhosts/zirg.com/public/vendor/magento/module-customer/Observer/Visitor/InitByRequestObserver.php(24): Magento\Customer\Model\Visitor->initByRequest(Object(Magento\Framework\Event\Observer))
#18 /var/www/vhosts/zirg.com/public/vendor/magento/framework/Event/Invoker/InvokerDefault.php(73): Magento\Customer\Observer\Visitor\InitByRequestObserver->execute(Object(Magento\Framework\Event\Observer))
#19 /var/www/vhosts/zirg.com/public/vendor/magento/framework/Event/Invoker/InvokerDefault.php(61): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Magento\Customer\Observer\Visitor\InitByRequestObserver), Object(Magento\Framework\Event\Observer))
#20 /var/www/vhosts/zirg.com/public/vendor/magento/framework/Event/Manager.php(66): Magento\Framework\Event\Invoker\InvokerDefault->dispatch(Array, Object(Magento\Framework\Event\Observer))
#21 /var/www/vhosts/zirg.com/public/var/generation/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch('controller_acti...', Array)
#22 /var/www/vhosts/zirg.com/public/vendor/magento/framework/App/Action/Action.php(91): Magento\Framework\Event\Manager\Proxy->dispatch('controller_acti...', Array)
#23 /var/www/vhosts/zirg.com/public/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#24 /var/www/vhosts/zirg.com/public/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Customer\Controller\Account\Login\Interceptor->___callParent('dispatch', Array)
#25 /var/www/vhosts/zirg.com/public/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Custome...', 'dispatch', Object(Magento\Customer\Controller\Account\Login\Interceptor), Array, 'contextPlugin')
#26 /var/www/vhosts/zirg.com/public/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))
#27 /var/www/vhosts/zirg.com/public/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Store\App\Action\Plugin\Context->aroundDispatch(Object(Magento\Customer\Controller\Account\Login\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#28 /var/www/vhosts/zirg.com/public/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Custome...', 'dispatch', Object(Magento\Customer\Controller\Account\Login\Interceptor), Array, 'customer-app-ac...')
#29 /var/www/vhosts/zirg.com/public/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))
#30 /var/www/vhosts/zirg.com/public/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Customer\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Customer\Controller\Account\Login\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#31 /var/www/vhosts/zirg.com/public/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Custome...', 'dispatch', Object(Magento\Customer\Controller\Account\Login\Interceptor), Array, 'storeCheck')
#32 /var/www/vhosts/zirg.com/public/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))
#33 /var/www/vhosts/zirg.com/public/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Store\App\Action\Plugin\StoreCheck->aroundDispatch(Object(Magento\Customer\Controller\Account\Login\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#34 /var/www/vhosts/zirg.com/public/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Custome...', 'dispatch', Object(Magento\Customer\Controller\Account\Login\Interceptor), Array, 'customer_accoun...')
#35 /var/www/vhosts/zirg.com/public/vendor/magento/module-customer/Controller/Plugin/Account.php(60): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))
#36 /var/www/vhosts/zirg.com/public/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Customer\Controller\Plugin\Account->aroundDispatch(Object(Magento\Customer\Controller\Account\Login\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#37 /var/www/vhosts/zirg.com/public/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Custome...', 'dispatch', Object(Magento\Customer\Controller\Account\Login\Interceptor), Array, 'weee-app-action...')
#38 /var/www/vhosts/zirg.com/public/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))
#39 /var/www/vhosts/zirg.com/public/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Weee\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Customer\Controller\Account\Login\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#40 /var/www/vhosts/zirg.com/public/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Custome...', 'dispatch', Object(Magento\Customer\Controller\Account\Login\Interceptor), Array, 'tax-app-action-...')
#41 /var/www/vhosts/zirg.com/public/vendor/magento/module-tax/Model/App/Action/ContextPlugin.php(91): Magento\Customer\Controller\Account\Login\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))
#42 /var/www/vhosts/zirg.com/public/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Tax\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Customer\Controller\Account\Login\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#43 /var/www/vhosts/zirg.com/public/var/generation/Magento/Customer/Controller/Account/Login/Interceptor.php(39): Magento\Customer\Controller\Account\Login\Interceptor->___callPlugins('dispatch', Array, Array)
#44 /var/www/vhosts/zirg.com/public/vendor/magento/framework/App/FrontController.php(55): Magento\Customer\Controller\Account\Login\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#45 /var/www/vhosts/zirg.com/public/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#46 /var/www/vhosts/zirg.com/public/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#47 /var/www/vhosts/zirg.com/public/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...')
#48 /var/www/vhosts/zirg.com/public/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))
#49 /var/www/vhosts/zirg.com/public/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))
#50 /var/www/vhosts/zirg.com/public/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')
#51 /var/www/vhosts/zirg.com/public/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))
#52 /var/www/vhosts/zirg.com/public/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))
#53 /var/www/vhosts/zirg.com/public/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...')
#54 /var/www/vhosts/zirg.com/public/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))
#55 /var/www/vhosts/zirg.com/public/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))
#56 /var/www/vhosts/zirg.com/public/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...')
#57 /var/www/vhosts/zirg.com/public/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(68): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))
#58 /var/www/vhosts/zirg.com/public/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#59 /var/www/vhosts/zirg.com/public/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'infortis_cgen_m...')
#60 /var/www/vhosts/zirg.com/public/app/code/Infortis/Cgen/Plugin/Magento/Framework/App/FrontController.php(32): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))
#61 /var/www/vhosts/zirg.com/public/vendor/magento/framework/Interception/Interceptor.php(142): Infortis\Cgen\Plugin\Magento\Framework\App\FrontController->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#62 /var/www/vhosts/zirg.com/public/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#63 /var/www/vhosts/zirg.com/public/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#64 /var/www/vhosts/zirg.com/public/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#65 /var/www/vhosts/zirg.com/public/index.php(41): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#66 {main}";s:3:"url";s:117:"/customer/account/login/referer/aHR0cHM6Ly93d3cuemlyZy5jb20vY2F0YWxvZy9wcm9kdWN0L3ZpZXcvaWQvNzAyMTYvI3Jldmlldy1mb3Jt/";s:11:"script_name";s:10:"/index.php";}
The text was updated successfully, but these errors were encountered: