0

I have a shop (Magento 1.9) with ~40.000 products. Every night they will be imported/updated via cronjob. There are other cronjobs that do various database operations as well.

In my import script there are also custom database connections (Mage::getSingleton('core/resource')->getConnection('core_write')).

Occasionally when the shop is crowded with visitors the database seems to be blocked with sleeping connections: General error: 1205 Lock wait timeout exceeded.

I was relying upon magento to take care of the connections but it seems I was mistaken.

Now I am not sure if and at what point (after each use? after the script finished?) I should close those connections manually and what the implications are. Is it ok to simply kill all connections from time to time?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.