|
Martin just curious what improvement did 1.8.3+ make that led you to believe that it might be better for this? We (SFSU) also encountered this problem although for our main production site we are still running a heavily customized 1.5.4+ version of Moodle... thanks!
There was no luck. Using the moodle available this morning with this command
cvs -z3 -d:pserver:anonymous@es.cvs.moodle.org:/cvsroot/moodle co -r MOODLE_18_STABLE moodle and raising the memory limit to 512MB we had the next error message after 41 minutes: [Wed Nov 28 13:41:05 2007] [notice] child pid 9846 exit signal Segmentation fault (11) The cron report message finish with the "Sending forum digests:" line. In previous days with 128 MB we had this error message: With 192 MB: With 256 MB: If I may I have changed the priority of this ticket to "Critical" as it really made large sites paralyzed - all "forum digest" were not sending out at all! The key file (IMHO) is the /mod/forum/lib.php, and we probably need to look into the function forum_cron(). For this function I compared with v1.536.2.33 (released with Moodle 1.8.2) and the MOST recent v.536.2.40 (2007/11/28), found that there were no change for this function. Just a quick FYI
by the way we temporarily bump up the memory_limit in this script to 1024MB and it seems to work fine now. I will take a look at the two tickets Martin mentioned. Thanks Martin!
I'm trying to reproduce your setup here... Can you tell us how many forums you have, and an estimation of how many posts are sent through digests every day? This will let me run some tests after backporting the patches mentionned by Martin.
This is a backport of the patches mentionned earlier by Martin. This patch applies to moodle-1.8.3+, on November 30. It was made against cvs (MOODLE_18_STABLE) today.
It also includes a backport of the modifications made to print_user_picture() (in lib/weblib.php) in 1.9. Our bigger Moodle has 1261 forums. When all of our users have the digest option disabled we are sending more than 10.000 messages every day. But due to a management imposition we need to force everybody to use the digest feature.
I am going to try your patch. Thank you for your efforts. After applying your patch: "PHP Fatal error: Call to undefined function rs_EOF() in mod/forum/lib.php on line 503"
Yep, that function was added for Moodle 1.9.
Under Moodle 1.8 you can replace safely: if (!rs_EOF($digestposts_rs)) { by: if (!$digestposts_rs->EOF)) { Note for devs: I wouldn't backport the rs_EOF() function to 1.8 Ciao A new version of the patch, with the fix sent by Eloy.
Hi Mathieu,
just reviewed quickly the patch and... uhm... it's BIG ! And include DB modifications (warning!). Looks correct code and I think it can fit into 18_STABLE. Just noticing about it's a big backport, not only modifying digests but other forum parts. +1 for MD to decide. Ciao This is a new (and hopefully, final) version of the patch, excluding the database changes and some whitespace that crept in the first files. It also incorporates the fix Eloy sent, for the "->EOF" problem.
You probably need to use "patch -p1" to apply. This time it works. It's a very slow process and maybe I need to tune my email server.
Big thanks to everybody. Gustavo quick question, does the final patch works for earlier version of moodle, like 1.7, 1.6, or even 1.5? Many thanks!
I doubt it would apply to earlier versions, considering the amout of changes, but possibly... Which version are you using?
Mathieu, we are using a customized 1.5.4+ for our main production site. Thanks!
The last commit should fix it for version 1.8.3+. The patch doesn't apply to 1.7, and the backport would probably (I had a quick look) require significant work.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
If not, Mat will help debug the situation.