Memory Problems

Memory Problems

by Joseph Becker -
Number of replies: 3
I am currently running Ubuntu 8.04.

My server is a 4xIntel(R) Xeon(R) CPU L5420 @ 2.50GHz
with 1080 MB of ram.

I have these apps currently running:
http://p.linode.com/2664

I apologize but I am new to running moodle on my own server and I could really use some help.

Everything is functioning well at http://wells-school.com/wellsonline/

My problem is that when my students and I are setting things up for next year all of the memory gets devoured. I have been able to replicate this by simply making 20+ links visible or invisible. On top the memory maxes out and it takes 2-5 min before the requests are filled and that computer sees a new page.

At this time other computers seemed to be served with quick speed.

I have now limited MaxClients to 70 from 150.

The guy in charge of my VPS company suggested I try running moodle under php-cgi behind lighttpd or nginx could help keep the memory usage down.

IS there any other known method for fixing this memory problem?

Thank you in advance,
Joseph
Average of ratings: -
In reply to Joseph Becker

Re: Memory Problems

by Ron Meske -
Picture of Particularly helpful Moodlers
When you say "...all of the memory gets devoured" do you mean you are monitoring the servers memory usage and see that it is using all 1GB?

As I am not sure exactly what you are monitoring for memory usage, here are a few things to check:
  • Check your MySQL settings. There are several settings depending on the type of your database.
  • Check your Apache configuration. There are several ways of reducing its memory usage.
  • Check to see what the memory_limit is set to in your PHP.INI file.
A simple, straight forward utility I found for Linux is Htop. You can view all processes running and their resource usage.

If you are new to tuning Apache and MySQL, this article may help you. Optimizing MySQL and Apache for Low Memory Usage, Part 1. I consider 1GB of memory to be low for a server, so optimizing all your settings are critical to maximize the use of memory.
In reply to Joseph Becker

Re: Memory Problems

by Jon Witts -
Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
This article in the docs http://docs.moodle.org/en/Performance#Apache_performance really helped us tweak our apache memory usage and also the help I got from Martin in this discussion may help too http://moodle.org/mod/forum/discuss.php?d=115454

Jon
In reply to Jon Witts

Re: Memory Problems

by Jason Hollowell -
Picture of Particularly helpful Moodlers
Joseph,

I found this thread after receiving and responding to a couple of your PM's. This provides a little more information but I'm afraid I still don't know what the root of your problem is.

I can say that I have Moodle 1.9.5+ installed on a backup server (old Macintosh Powerbook Pismo (900Mhz upgraded processor) with 1Gig of RAM running Ubuntu 8.04) and had to use the backup server to serve our Moodle site a little over a month ago when the motherboard in our main machine (XServe G5, 2.3Gh DP machine with 4.5 Gigs of RAM) got fried.

Our site has about 4000 registered users and gets approximately 225 logins per day so it's not really a heavy site in terms of activity but there are times when 50 to 75 students are logging in all at the same time. I was very surprised to see the laptop serve the site with very little issue for the few days that we were forced to use it. It wasn't as fast as the XServe but wasn't overly sluggish.

So, I'm not sure that I understand why your machine (even though it only has 1 gig of RAM) would be running out of memory. I haven't tweaked the Apache settings from the base LAMP ubuntu install so I had MaxClients set to the default. The only things I've modified are a few of the php settings to allow for larger file uploads and a few addons that are required by Moodle.

Sorry I can't be of more help.

Jason

P.S. I just tried to access your site but it must be down as I wasn't able to get a response.

P.P.S. The site just connected. Looks really cool! Any chance that you have theme related issues? Is that one of the Newbury themes?