Database/Performance Troubles =[


Im a bit of a newbie to this so you'll have to excuse me if some of these questions are a bit obvious... Basically Im in the process of customizing my elgg (1.7.1) site and have already come into problems regarding the performance of my setup.

The site seems to run fine as far as I can see with a maximum of 3 widgets on my profile or dashboard page but when I begin to add more it becomes very temperamental (it does some times work with 4) What happens is that when the widget laiden page is loading most of the widgets load up fine but a random one will appear as a database error: 'cannot connect to the database with the given credentials' & the appearence of the site changes to a blue background.

Im guessing that the problem will be my database stuggling with multiple read/write commands at once - I have read things in the docs that can be done to optimise performance - split r/w, memcache, etc. but I have no clue how to even begin doing this?

besides all of that is in the scalability section - which suggests adaption to come with huge amounts of users, surely it shouldn't need to be done to come with one test user with a few widgets?

Any help or suggestions greatly appreciated!



  • If your server is having problems with a few widgets, there is no way it can handle running an Elgg-based site. Elgg was not meant to run on cheap shared hosting.

  • It shouldn't be having problems though, it isn't cheap shared hosting... it is a dedicated server with unlimited space & bandwidth so the problem must lie elsewhere?

  • Well, there is something very wrong with your server then. Profile pages load the widgets through ajax so they are separate hits against your web server. Each one will open a connection to your database. It looks like a single user hitting a profile page is exhausting the available connections to MySQL. (Unless you are running other apps on the server in which case they may be keeping your server close to its maximum load and Elgg is just pushing it over the edge.)

  • Hi Brew,

    I've recently set up an Elgg demo site for a client with 11 widgets on my profile page.

    There have been no problems so it looks like your issue is server specific.

    It sounds like you are having MySQL problems.

  • OK thanks for your help - can anyone suggest a good server to host on then?

  • "... can anyone suggest a good server to host on then?"

    Yes; kNet Hosting in the UK is easily affordable, fast and stable, and the team give superb and speedy technical support. (I'm not affiliated or working for them, but have been a customer for over a year now).

  • If you've been with them for 1 year, they're most likely ok. So to get back to your MySql issues - must be as said above -> poorly tuned MySql ;-( maybe max threads is too low to support all your applications' requests. See if your Tech Support can help out.

  • Im hosted with a freinds dedicated server - he owns it and offers me free hosting on it. Ill have a check out of knet and look into the sql thing... cheers

Performance and Scalability

Performance and Scalability

If you've got a need for speed, this group is for you.