开发者

"Failed Attempt" in MySQL Connection

I am confused with MySQL connections. I have site that receives heavy requests during working hours. I use PHP to connect to MySQL database using persistant connection. Few weeks back, I increased mysql connections to 500 that crashed my server then I put it back to 150. Now users complaints that sometimes they cannot get on the site. I believe that this is due to limited connections.

Can you please give me some information that whether I use persistant or non-persistant? What sections of mysql do I need to tune to get optimized connection processing? I have attached a screenshot that shows 11K Failed Attempts. http://i.stack.imgur.com/GkxHP.jpg

Thank you so much...

Update Dec 17, 2011

When I asked this question, I changed the connection type to "non-persistant" and everything starts working fine. Today I surprised to see that the stats from phpmyadmin. Below are the values given by Phpmyadmin:

max. concurrent connections :: 16
Failed Att开发者_开发问答empts :: 43k

Please suggest some possible solutions? Which parameter should be optimized to avoid/minimize Failed attempts?


High traffic sites should not use persistent connections. I changed DB connection from persistent to non-persistent in php and problem solved! Thanks for your help.

EDIT: After changing connection type to non-persistent, don't forget to increase number of connections. In my case, I increased them to 500 with type set to non-persistent and that solved the issue.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜