Daric
Daric

Reputation: 16769

Magento MySQL connection close necessary

I have opened MySQL database connection using the code below

Mage::getSingleton('core/resource')->getConnection('core_write');

Do I need to close this mysql connection on my own or the Magento handles it by default?

Upvotes: 2

Views: 3222

Answers (2)

Muhammad
Muhammad

Reputation: 11

you need to close db connection because if you not close connection with db in custom query then it will become sleeping query. that the problem i am facing right mysql server is full of sleeping queries. i finding solution for that one.

Upvotes: 0

Alex
Alex

Reputation: 34978

No, you do not have to close it.

Upvotes: 1

Related Questions