简体   繁体   中英

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?

不,您不必关闭它。

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM