Zend Framework app not closing mysql connections properly

后端 未结 6 1258
Happy的楠姐
Happy的楠姐 2021-01-14 04:29

I\'m having a weird issue using Zend_Db\'s PDO adapter for managing my database connections. All of a sudden, I\'m constantly hitting the connection limit on my MySQL server

6条回答
  •  我在风中等你
    2021-01-14 05:09

    I think one of your script is running an ultra long query or get stuck ?

    The best solution would be to create a logging tool and use that to know where exactly the problem is.

    The Zend_Log classes should help you to write that logging tool, obviously you have better to user a file writer and not a DB one. Since your problem is DB related you should create or modify the DB class to emit some logs.

    I don't know the volumetric of your project but it might have some performance side effects.

    Also playing with the long query feature of MySQL would probably give you some hint.

    Hope you are going to find where is your problem.

提交回复
热议问题