Too many MySQl concurrent connections

Hello,

My elgg site was down, showing the standard DB connection error message (wrong credentials...).

The ISP told me the problem was caused by elgg using too many persistent connections, the site has only a few users but some chatty plugns like elgg_chat and online_mark, the average queries is ~ 100/second.

What can I do to prevent elgg will be blocked again?

Also, I see in phpmysqladmin that the runtime value for

Select_full_join 1,672

 

is quite high : 1672, meaning there is a lot of join quesries without indexes. What can I do to solve this problem?

Thank you for helping.

 

 

 

  •  

    I am using elgg 1.7.10. I have also this same issue...

    I had tried to solve by put mysql_close() function in many places...

    But it will affect the system messages...

    If the mysql_close() function put ent of the pagehandler.php, the system message will not cleared. so the every refresh duplicate message will shown...

    If the mysql_close() function put in the shutdown section, the system message will not displayed in anyware...

    Anybody know how to solve this issue...?

    Thanks in advance....

     

  • I think this is a standard problem for elgg user. You really need to have a machine powerful enough to host elgg. My site ran fine for about 6 months with 100 visitors. 1k-10k (i don't know what the number is but it's somewhere in the Ks) is where problems start. I have reviewed a lot of people with this problem over the past couple of months from posts on this site and that be that, the solution is to get a better server. If you are on shared hosting that is just troublesome. Even with a few visitors it will generate a lot of queries thus hitting your MYSQL limits. That being said I'm not a linux admin and can only share with you what I read and my experience. If someone has a solution then that be that =)

  • @Akhilesh: Elgg 1.7 does not create persistent connections (it uses mysql_connect). If you insist on calling mysql_close(), place it in your own function and register that function with register_shutdown_function.