WeBWorK Main Forum

Server lagging

Re: Server lagging

by Danny Glin -
Number of replies: 0

There is a little bit of information at https://webwork.maa.org/wiki/Installation_Manual_for_2.17_on_Ubuntu#Configuring_Apache.  You can also find a number of threads about server performance by searching the forums.

Here's a brief explanation:

The MaxRequestWorkers setting in apache controls the maximum number of apache processes that will be spawned to handle web requests, which translates to the maximum number of simultaneous requests that your web server can handle.  If more requests are received than there are workers, they have to wait for a worker to finish serving the current request before it can accept another.

In most cases (particularly in homework mode) this is not an issue since the requests tend to be completed quickly enough that backlogs don't form, but if you have a large number of students accessing a problem simultaneously it can occur, particularly if the problem is slow to render (e.g. if the problem has to generate a dynamic graph or has an inefficient loop).

You can increase the value of MaxRequestWorkers, but you need to be careful because each worker takes up a significant amount of RAM, so having too many workers can run your server out of memory.