The MU forums have moved to WordPress.org

Too many db-requests (18 posts)

  1. stutley
    Member
    Posted 15 years ago #

    Hi all,

    So I logged on to my mu-site this morning and found mysql-errors all over the place - like this:

    [User '*****' has exceeded the 'max_questions' resource (current value: 50000)]

    I talked to my host and they confirmed that they have set this limit.

    The thing is, I only have like 4-500 blogs, many of them inactive, so I really can't see how I could reach that limit.

    I remember reading something about multiple servers/multiple databases - would that help?

    Or do you guys have any other suggestions?

  2. Ovidiu
    Member
    Posted 15 years ago #

    as your host set that limit, it means you are on shared hosting, right?

    the thing with multiple databases was discussed here for blognetworks with severall 10000 blogs...

    I would suggest looking for another host or a VPS or even a dedicated server.

  3. stutley
    Member
    Posted 15 years ago #

    Darn it :)

    But thanks - I'm still open for other suggestions as well :)

  4. stutley
    Member
    Posted 15 years ago #

    By the way, can you recommend any VPS/dedicated server providers?

  5. Ovidiu
    Member
    Posted 15 years ago #

    to be honest I don't know anything about this max_questions thing, so I can't tell you how you reached it. maybe someone else can figure out what this means...

    If you are still interested in a VPS or a dedicated server, you should also state in which country you prefer your server to be located, what you need in terms of OS/applications installed, if you are able to manage your own server, etc.etc. - give us as many details as you can so we can give you the best advice possible.

  6. stutley
    Member
    Posted 15 years ago #

    Well, I'm based in Denmark, so anything in Scandinavia would work just fine.

    Of course, I need Apache/PHP5/MySQL, but have no experience in Linux systems, so Windows would be preferable. I can manage the server, but would prefer anything that is as simple to manage as possible as I have a lot of things going on :)

    I'm probably leaning towards the dedicated server option.

  7. andrea_r
    Moderator
    Posted 15 years ago #

    CHeck your plugins.
    Are you being hit with spam?
    Search engines trawling your site too often?
    And clean out the "inactive" blogs.

  8. drmike
    Member
    Posted 15 years ago #

    the thing with multiple databases was discussed here for blognetworks with severall 10000 blogs...

    I don't think it ever really got solved. It got started and hinted at.

  9. lunabyte
    Member
    Posted 15 years ago #

    Nope. No "real" working solution. Idle chit-chat pretty much.

    As for a dedicated windows server, I'd recommend against the windows portion. You'll thank yourself in the long run.

    But temporarily, cleaning out all the ones that still say "Hello World" would help.

    For me, if it says that for 2 weeks, I clean it out. If it's only a post or two, I clean it out after about a month.

  10. stutley
    Member
    Posted 15 years ago #

    Thanks for all the suggestions. I had to take down the site for an hour or so, but we're up and running again.

    Looks like I'll be spending the weekend on debugging and optimising. I wonder if using a cache plugin will help?

  11. lunabyte
    Member
    Posted 15 years ago #

    You did turn on the Object cache, right?

    That "might" help.

    In wp-config, add this right below the line where the table prefix is set:

    define('ENABLE_CACHE', true);
  12. stutley
    Member
    Posted 15 years ago #

    Yeah. But "might" help doesn't sound really good :D

    I'm thinking about taking a look at the WP-Cache plugin - I remember there was a thread about adapting it to MU once, but I'm not sure if it was resolved...

  13. drmike
    Member
    Posted 15 years ago #

    If you have enough traffic where it's necessary, the cache will help. If you have a lot of blogs where they may get one or two views a day, they won't do much.

  14. lunabyte
    Member
    Posted 15 years ago #

    Using the internal cache does help, so don't get me wrong. I even use it on my localhost.

    By "might help", I mean it might correct your problem. It will help either way.

  15. kingler
    Member
    Posted 15 years ago #

    The internal cache may not work very well if disk writing is not fast enough on your machine. Memcached is a better solution if you own your box and have large memory.

  16. lunabyte
    Member
    Posted 15 years ago #

    Of course it is, but the guy is on shared hosting. Object cache is about the only safe bet they have, before it's time to move hosts and get control of the box.

    I'm sure everyone would just "love" to be able to have a memcached box. But most people aren't going to add a box just for that unless they get very, very big. Not to mention, I'd be willing to bet the majority of MU installs are on shared hosting.

    But yes, you're right, memcached is a great tool if you have the resources to do it.

  17. Farms2
    Member
    Posted 15 years ago #

    Make sure that if you've upgraded from 1.0 to 1.1 you also upgrade your .htaccess

    Symptoms of not doing so include impression of too many db requests and feelings of extreme stupidity - I, um, should know ;)

  18. drmike
    Member
    Posted 15 years ago #

    I thought you could go memcache on a single site. I remember something about this in the mediawiki project...

About this Topic