Installation

Workers/children/RAM guidelines?

Workers/children/RAM guidelines?

by Miguel-Angel Manrique -
Number of replies: 11
Hello

I was hoping to get some guidance in setting up my WeBWorK server. My issue is that some students are complaining about slow page loads and "page not found" errors when they submit answers to their questions.

Not all students are having this complaint, interestingly. In particular, one of my classes has gotten only true/false and multiple-choice questions, and they have not gotten any page-not-found errors.

I have tried things like filtering the classlist by section number and then I too get the page-not-found error. However, I was able to filter by section number one time (out of around 10 attempts), but it did take a while. I'm somewhat perplexed by this issue and hope someone here can chime in with server settings suggestions.

I recently migrated to a decent server, so I don't think lack of resources are the problem. Here are the stats:

server_stats

I've seen the RAM usage go as high as about 2GB.

Also, I don't think I've been hacked. Here is the output of top:

top_output

The above loads are fairly typical, I'd say. Sometimes there are more processes (close to deadlines), but I've never noticed anything using more than 5% RAM.

My question: given the stats of my server, what settings should I try to make the user experience best for my students? I installed using default settings on aubreyja's recent script except for upping a certain parameter to 80 (I forget the parameter, but it said something about 20 _____ per each GB of RAM is a good guideline). I think it was worker or child, I don't remember.

Your ideas are welcome. Thank you for everything you do for this project!

Miguel-Angel Manrique
In reply to Miguel-Angel Manrique

Re: Workers/children/RAM guidelines?

by Miguel-Angel Manrique -
One of my students has just emailed me with the error below, maybe this sheds some light on the situation. The class he is in has only gotten multiple-choice and true/false questions ..
error_msg

In reply to Miguel-Angel Manrique

Re: Workers/children/RAM guidelines?

by Arnold Pizer -
Hi,

Not sure how you set your server up.  There are general instructions at http://webwork.maa.org/wiki/Installation_Manual_for_2.12_on_Ubuntu_16.04

In particular, look at http://webwork.maa.org/wiki/Installation_Manual_for_2.12_on_Ubuntu_16.04#Configuring_Apache

Hope this helps,

Arnie
In reply to Arnold Pizer

Re: Workers/children/RAM guidelines?

by Miguel-Angel Manrique -
I have used this script to install: https://github.com/openwebwork/ww_install

I am thinking of taking down server and then setting it up following the general instructions, possibly this evening.

Thanks
Miguel
In reply to Miguel-Angel Manrique

Re: Workers/children/RAM guidelines?

by Arnold Pizer -
Hi Miguel,

Using the script for the installation should be fine (it basically follows the instructions).  But by default the script sets Apache's parameters assuming 1 GB of memory so you should adjust those.  Was this a clean install on a new server? Might there be other resourse issues (disk space, etc) as Danny suggested?

Arnie
In reply to Arnold Pizer

Re: Workers/children/RAM guidelines?

by Miguel-Angel Manrique -
Very interesting. I am very sure I set MaxRequestWorkers to 80 during this install. I will double-check right away though.

It was a clean install on a new server, yes. I checked hard disk space, and there is plenty of space.

Miguel
In reply to Miguel-Angel Manrique

Re: Workers/children/RAM guidelines?

by Danny Glin -
The symptoms you described are not the usual behaviour of a system that is running out of resources.  It seems like the problem may be something different.

Of course the first thing to try is restarting apache, followed by rebooting.

Another thing to check is that there isn't an individual partition that has run out of space (the command 'df -h' is good for this).  Depending on your linux installation it's possible that the /opt partition is small (which is where all of WeBWorK lives).

If these don't help, can you provide us with the version of linux you are using?
In reply to Danny Glin

Re: Workers/children/RAM guidelines?

by Miguel-Angel Manrique -
I usually just restart the server once an hour when I know students are working on it. Students still get the page not found errors though. My linux install is Centos 7 64-bit, with partitions that have space.

disk_space

(I'm thinking I'll set an iptables rule to only allow ssh from certain IP ranges, to bring the number of failed logins down..)
In reply to Miguel-Angel Manrique

Re: Workers/children/RAM guidelines?

by Andras Balogh -
"... restart the server ... when I know students are working on it."
That sounds harsh.

Have you searched for old posts like this:
http://webwork.maa.org/moodle/mod/forum/discuss.php?d=2673
In reply to Andras Balogh

Re: Workers/children/RAM guidelines?

by Miguel-Angel Manrique -
Ah yes, harsh indeed.

But harsher was an email from a particularly stressed-out student unable to do her homework..

I will read through the post you linked carefully, thank you!
In reply to Miguel-Angel Manrique

Re: Workers/children/RAM guidelines?

by Miguel-Angel Manrique -
Update: it seems to matter whether one uses Ubuntu 15.10 or Ubuntu 15.10 minimal as the base operating system. Yesterday I leased a VPS from a host offering Ubuntu 15.10 and successfully ran aubreyja's install script. All WeBWorK features seem to be working well now, and with speed.

When the server was running CentOS 7 a day ago, I believe it was the normal version, but students were still encountering problems. I think another lesson here is that not all VPS hosts are equal. I am paying substantially more per month now (and getting less RAM!) but having a functional WeBWorK server is worth every penny.

I hope this information helps someone in the future.