The MU forums have moved to WordPress.org

Handling loads (18 posts)

  1. josswinn
    Member
    Posted 15 years ago #

    Hello,

    I've been running a WPMU installation for a few months and it's starting to see more activity recently. I'm realising that 2GB of RAM for a RedHat virtual machine isn't enough. Whenever it takes even a minor hit, the machine seizes up.

    Can anyone offer some advice on a decent VM setup: suggested amount of RAM, common ways to optimise httpd, php and mysql requests, etc. I've been testing eAccelerator, which improves response time. This doesn't seem to mix well with wp-super-cache though.

    Thank you
    Joss

  2. andrea_r
    Moderator
    Posted 15 years ago #

    2 gigs of RAM? How many blogs? how many hits? How much activity are we talking?

    MU eats up ram, but not that much. Either the box needs tweaking or a plugin is going crazy or there's some horribly overlooked setup going on. :D

  3. tdjcbe
    Member
    Posted 15 years ago #

    Anything in the error logs? When you do a top from the command line, what do you see using up memory and processor? Are you using any sort of hosting control panel?

  4. Klark0
    Member
    Posted 15 years ago #

    Don't forget your plugins. Badly coded ones are more often than not...the problem.

  5. josswinn
    Member
    Posted 15 years ago #

    Well, I've fixed the problem. Some corrupted db tables were causing MySQL to use all available CPU. Yesterday, I set up eAccelerator (works great!) and also Donncha's site-wide-tags. I also tried wp-super-cache and thought there was a conflict with eAccelerator but was wrong about that. They are working well together now. The fastest the site has ever been.

    Around the time it started going wrong, lots of these messages appeared.

    PHP Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading authorization packet', system error: 104 in /var/www/html/chat/bb-includes/backpress/class.bpdb.php on line 123

    and:

    [Mon Oct 13 16:56:41 2008] [error] [client 194.80.61.106] PHP Warning: mysql_connect() [function.mysql-connect]: Too ma
    ny connections in /var/www/html/chat/bb-includes/backpress/class.bpdb.php on line 123

    This is a bbpress error (also on the same server) and a couple of days ago, I linked WPMU to BBPress 1.0a using Sam's bbpress-live plugin. However, bbpress has no users so I'm not sure why it suddenly went out of control.

    That's all I can tell you. It's made me get around to doing a few server chores that I've been meaning to do for a while.

  6. josswinn
    Member
    Posted 15 years ago #

    ah, yes. I also added the 'related posts' plugin yesterday before things went wrong.

    Still looking at my apache logs:

    I'm getting two errors in my log files that I don't know where they originate from. Neither are causing a problem, but they're irritating :-)

    XML_ERR_NAME_REQUIRED at line 303, column 147 : No idea where this is from. Can't reproduce it but it shows up on a regular basis.

    script '/var/www/html/blogs/upgrade.php' not found or unable to stat : This appears when navigating to my blog Dashboard. Doesn't happen on any other blogs I've tested.

  7. josswinn
    Member
    Posted 15 years ago #

    Just to answer some questions above...

    Each instance of apache uses 23MB of memory and there are up to 20 alive at one time = 460MB. mysqld runs at about 40MB so that's 500MB that is often needed. httpd and mysqld are the memory and CPU hogs out of all running processes. It's not a hosted server. It's a server at the university where I work and I have root access. It's not actually hit that often. It's largely an experimental installation with only a few occasional users. A big 'hit' is maybe 40 or 50 requests over a short period, like yesterday.

    With mysql and apache stopped, 1.2GB of RAM is being used by other processes on the system. I need to look at pruning this.

    For the time-being, it's been given 3GB of RAM, which seems a bit excessive...

  8. andrea_r
    Moderator
    Posted 15 years ago #

    "script '/var/www/html/blogs/upgrade.php' not found or unable to stat : This appears when navigating to my blog Dashboard. "

    You know what? I've been getting that same freaking error. Driving me nuts, filling up the error logs. Grep the code and there's no reference to it.

    "Each instance of apache uses 23MB of memory and there are up to 20 alive at one time = 460MB. mysqld runs at about 40MB so that's 500MB that is often needed. httpd and mysqld are the memory and CPU hogs out of all running processes."

    That doesn't seem right. :-/

  9. josswinn
    Member
    Posted 15 years ago #

    I only get the upgrade.php error on my own personal blog. If I use the Dashboard of another user's blog, it doesn't appear. I wonder if it's left over from some plugin I had installed.

    Here's grep output from the entire site:

    grep -i -r "upgrade.php" /var/www/html/blogs/
    /var/www/html/blogs/index-install.php: include_once('./wp-admin/includes/upgrade.php');
    /var/www/html/blogs/wp-includes/wpmu-functions.php: require_once( ABSPATH . 'wp-admin/includes/upgrade.php');
    /var/www/html/blogs/wp-admin/upgrade-functions.php:// Deprecated. Use includes/upgrade.php.
    /var/www/html/blogs/wp-admin/upgrade-functions.php:_deprecated_file( basename(__FILE__), '2.5', 'wp-admin/includes/upgrade.php' );
    /var/www/html/blogs/wp-admin/upgrade-functions.php:require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
    /var/www/html/blogs/wp-admin/wpmu-upgrade-site.php: @$client->fetch($siteurl . "wp-admin/upgrade.php?step=1");
    /var/www/html/blogs/wp-admin/admin.php: @$client->fetch( get_option( "siteurl" ) . "wp-admin/upgrade.php?step=1");
    /var/www/html/blogs/wp-admin/admin.php: require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
    /var/www/html/blogs/wp-admin/upgrade.php:require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
    /var/www/html/blogs/wp-admin/upgrade.php:<p class="step">"><?php _e('Upgrade WordPress'); ?></p>

  10. josswinn
    Member
    Posted 15 years ago #

  11. andrea_r
    Moderator
    Posted 15 years ago #

    okay, now I'm hitting the same issues, and on this box I shouldn't be. Should be able to handle ti fine.

    1 GIG of RAM, initial blogs were running real slick, maybe 30 of them. imported in roughly 100 from another system and now it is s-l-o-w. Traffic is half as much as my other site I always mention. ;P

    RAM isn't hitting any limits, but CPU sure is. TONS of crap in the error logs, mostly for non-existent stuff, which is ...weird...

    I just started digging around so who knows what I'll find.

  12. tdjcbe
    Member
    Posted 15 years ago #

    DDoS attack maybe? We've got logs filled with folks (ie Hacked boxes probably) searching for italian.php and the like.

    Thinking about doing four hour router blocks on them.

  13. andrea_r
    Moderator
    Posted 15 years ago #

    Nah, we're thinking an SQL query gone a little insane.

  14. josswinn
    Member
    Posted 15 years ago #

    Was it an SQL query?

  15. andrea_r
    Moderator
    Posted 15 years ago #

    Still digging. Got tired and cranky and went to bed. :)

  16. kavitamm
    Member
    Posted 15 years ago #

    Andrea, I just upgraded wpmu 2.6.2 to 2.7.1 and seeing the error "upgrade.php not found or unable to stat". I am not able to see admin blog Dashboard, but can see other blogs dashboard.
    I notice that you had seen this error in past, can you please let me know how did you fix it.

  17. andrea_r
    Moderator
    Posted 15 years ago #

    Can't quite remember specifically, but I may have called the regular upgrade to the main blog specifically.

    It's /wp-admin/upgrade.php I think.

  18. kavitamm
    Member
    Posted 15 years ago #

    Thanks Andrea, calling upgrade.php for the main blog specifically worked for me too. Thanks so much.

About this Topic

  • Started 15 years ago by josswinn
  • Latest reply from kavitamm