-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OU Search Indexing Not Completing #7
Comments
Hi For additional info on this, this looks to be the log entry for when the index rebuild process fails:
Do you know what could cause this? Thanks in advance, P.S. It does look more related to "mod_forumng", but hopefully if you've seen something similar before you could help shed some light on this. |
Sorry I have been really busy here... Unfortunately I don't know what is causing this problem. The error given only indicates that the script aborted unexpectedly - all that means is that, at the point when it exited, it was in the middle of a database transaction. It doesn't help us figure out why it exited in the first place. |
Thanks for your reply @sammarshallou Unfortunately there is not much else in the logs before that message besides the below messages which I get when attempting to access the Moodle home page from another tab in the same browser session:
While the index rebuild is running, I cannot see any status update although my colleague, Steph, can when she runs the index rebuild (pretty strange). She also gets a similar failure, but at a different point in the process to me and with additional log messages:
Question: Is there a clear way to tell how far the index rebuild process has gotten? Software versions: |
Re not seeing progress, make sure you are using a normal browser i.e. not IE - historically I remember there were problems with IE not updating the page until it's completely finished, not sure if that still applies with current IE versions but it might do. The count error sounds like a potential problem (with oublog not ousearch). Re maximum execution time, that sounds like there was a timeout because it takes too long! Looking at the code for oublog_ousearch_update_all, for instance, I think there is no mechanism to prevent it timing out - the code needs to reset the timeout each time around its loop, but it isn't doing that. Perhaps you could raise this on the tracker for the relevant modules. This is probably the most likely cause of the problem ie you have a lot of forum/blog/etc posts so it times out. I think this mechanism is a little bit ropey because we/most people probably haven't needed to rely on it... (So you can estimate how long it will take - it's probably vaguely on the order of 1 second per forum post or blog post etc, something like that.) |
Thanks Sam I like that: "a normal browser i.e. not IE" ;-) As for your suggestion regarding a mechanism for the application to reset the timeout value, I believe that in this case this is actually the cause of the problem. mod_forumng.php does attempt to implement this mechanism with the intention of allowing additional time. This override of the max_execution_time seems to then persist for the rest of the process for ouwiki and oublog, which have both failed on separate occasions due to the 300 seconds timeout. I have overcome this issue at the moment by simply changing this timeout value in mod_forumng.php to 600 seconds. I have now actually removed it completely, allowing for the PHP config to handle things. I will raise this point (with results found) over on forumng github issue tracker page: I can't help feeling like (if required) a temporary increase in the PHP max_execution_time via php.ini makes most sense, as otherwise there becomes a need to change code if the hard coded timeout value is insufficient (as in our case). If you are happy too, we can close this issue tracker. Thanks for your time. Cheers, |
Thanks Andrew! Yes I'll close this as I think the issues should be resolved within the code for each module. It sounds like ForumNG is using the 'old way' to increase the time limit. The correct 'new way' in Moodle (disclaimer, I added this myself about a year ago) is something like, off top of my head, core_php_time_limit::raise() which is a function that will only increase the time limit and not decrease it. Calling it repeatedly in a loop is correct, that way it 'can't' be insufficient - the raised time limit starts from where you are, so in the forumng case if it calls it for every discussion say, that means it has 300 seconds per discussion, so however manhy forums you have, even if it takes 10 hours, it won't time out. |
Hello,
I previously chatted to yourselves about the problems we were experiencing to do with the other OU plugins where certain characters and words were generating database errors when entered into posts or pages. We were told the way to fix this was to upgrade the OU search plugin which we have done on our development and test versions of Moodle. However, when we run the post install PHP script to re-index existing content it is failing to reindex all our content, seeming to stop after roughly 1 hour and 40 minutes. There is no time out set on our test system. I wondered if anyone has ever encountered this problem before?
I can send through some log files if that would be helpful, I'm trying to see if there is something obvious we have missed here. It all ran as expected on our development version of Moodle which has slightly less data than test but not much.
If you need any additional information let me know, any help or advice would be much appreciated.
Cheers,
Steph
The text was updated successfully, but these errors were encountered: