Moodle stuck in some operations

Moodle stuck in some operations

by Paolo Campegiani -
Number of replies: 3
I have installed a Moodle 1.9.2 on a Red Hat Enterprise Linux 5.2, with all the available updates installed.

So far, I've been able to define a course, configure it with a weekly structure and add some contents to it, mainly URLs to external sites and labels.

The problem is that when I try to insert a text/web page that is bigger than an (unknown) threshold, if I click the "save and return to course" button the site get stuck, and after some time I get a blank page with an URL like
http://site:port/course/modedit.php

The same problem (stuck site and a blank page, with the requested operation not performed) happens when I try to add a new user or define an activity like a quiz.

I have:

1) checked parameters in /etc/php.ini, the most relevant are:

max_execution_time = 45
max_input_time = 90
memory_limit = 96M
magic_quotes_gpc = On
post_max_size = 16M
upload_max_filesize = 16M
file_uploads = On

2) checked parameters in /etc/my.cnf, setting:

max_allowed_packet=4M

3) Set AcceptPathInfo on

4) Updated to Moodle 1.9.2+

The only "strange" thing is that Moodle is not running on standard port, using instead port 8000 and the site name is the IP number, but it doesn't seem relevant to me, as some functionality are working good (insert an external URL as a course material) and others are working partially (insert a text page as a course material, as long as it's very short), nor it seems a network problem (for the same reason, and also the weekly outline is a page that definitely requires more than a packet to be transmitted).

Is the non standard port the problem? Any hints?

TIA







Average of ratings: -
In reply to Paolo Campegiani

Re: Moodle stuck in some operations

by Ron Meske -
Picture of Particularly helpful Moodlers
Hi Paolo,

It sounds like a time-out issue. The possible cause of the timeouts is possibly communication with the database.

To see if it is a timeout issue try increasing the max_execution_time. I believe the default value for the Apache timeout directive is 300 seconds, so you can set max_execution_time up to that amount.

Ron
In reply to Ron Meske

Re: Moodle stuck in some operations

by Paolo Campegiani -
Hi Ron,

thanks for your suggestion. I've done it, but the result is the same, a blank page would the text of the composed text page longer than few lines. Interestingly, the time it takes to produce the blank page is the same as in the previous configuration. During that phase, the load average on the system barely reaches 0.1, and usually stays around 0.05.

I've also started mysql twith he option to log the slow queries, and I get nothing in its dedicated log.

Also, PHP is configured to log all errors:

error_reporting = E_ALL
display_errors = On
display_startup_errors = On
log_errors = On
error_log = /tmp/php.log

and config.php in Moodle root directory ends with:

require_once("$CFG->dirroot/lib/setup.php");

ini_set ('display_errors', 'on');
ini_set ('log_errors', 'on');
ini_set ('display_startup_errors', 'on');
ini_set ('error_reporting', E_ALL);
$CFG->debug = DEBUG_ALL;

// MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,
// RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.
?>


Result is that /tmp/php.log is empty (I've touch-ed it just to be sure it exists). Using error_log=syslog doesn't give me a single message all over /var/log/*.





In reply to Paolo Campegiani

Re: Moodle stuck in some operations

by Paolo Campegiani -

The problem was related to an improper handling of TCP MSS/IP MTU size. The actual server is behind an DSL line, and one of the router/NAT makes horrible horrible things to our packets.

Mangling TCP via iptables was not of help, but running the same LAMP configuration on 127.0.0.1 fixes the problem. It could be possible that there are some Apache tweaking to fix the problem (as scp, for example, works in both direction, whilst X11 port forwarding via SSH does not), but we prefer to move the server to a different location.