Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8895333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:45:00+00:00 2026-06-14T23:45:00+00:00

I am using Magento 1.7.0.2 Community Edition and I have encountered a big problem

  • 0

I am using Magento 1.7.0.2 Community Edition and I have encountered a big problem – deadlocks and “Lock wait timeout exceeded” errors. Problem exists while specific CRON tasks are executed

  • Importing/updating products(sizes, colors, manufacturers as well). There are around 5000 products but in 90% script gets “Lock wait timeout exceeded” errors or a deadlock error. Script is developed using Magento guidelines and it works fine if no other processes are running. For example if reindex is running, we get an error for sure. It seams that is because of table locks
  • Magento puts a read lock in some cases. I have read several topics about this already and the only proper solution seams to be changing /lib/Zend/Db/Statement/Pdo.php
    _execute function. As we are looking forward for upgrading Magento to the latest stable version we can`t afford changing core files.

So my question – is there a way how to avoid this(whether on PHP, MySQL or server(we use nginx) level)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T23:45:01+00:00Added an answer on June 14, 2026 at 11:45 pm

    I came across this issue whilst trying to import more than five or six products at once. There is more information on deadlocks available here.

    To solve this problem I had to place my database queries in SERIALIZABLE transactions where possible, like so:

    $adapter = Mage::getModel('core/resource')->getConnection('core_write');
    // Commit any existing transactions (use with caution!)
    if ($adapter->getTransactionLevel > 0) {
        $adapter->commit();
    }
    $adapter->query('SET TRANSACTION ISOLATION LEVEL SERIALIZABLE');
    $product->save(); // etc
    

    Transaction example:

    $adapter = Mage::getModel('core/resource')->getConnection('core_write');
    // Commit any existing transactions (use with caution!)
    if ($adapter->getTransactionLevel > 0) {
        $adapter->commit();
    }
    $adapter->query('SET TRANSACTION ISOLATION LEVEL SERIALIZABLE');
    $adapter->beginTransaction();
    try {
        $adapter->query(/* SQL goes here */);
        $adapter->commit();
    } catch (Exception $e) {
        // Rollback on fail always
        $adapter->rollBack();
        throw $e;
    }
    

    If you require any further help on this, feel free to let me know.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the Magento ver. 1.4.0.1 Community Edition. The problem I am running
I'm using Magento Community Edition ver. 1.6.2.0. I’m trying to add a Simple product
I am currently using Magento community edition, version 1.7.0.0, and as recommended by Magento
I am using Magento community version 1.5.1.0. I need to get a product have
I am using Magento community ver1.6.1.0. I found this state diagram on Magento wiki
We are using Magento as our eCommerce platform. We have Oracle apps in which
i am using Magento 1.5.1.0 and the mPAY24 Payment Gateway Extension. I have an
I am looking to set-up a Magento (Community Edition) installation for multiple clients and
I am using Magento ver1.5.1. I have the DB in a live serve and
I'm using magento 1.5. I have a requirement to install a third-party ecommerce package.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.