Tuesday, October 6, 2015

Monitor the moodle server error logs AKA Kill the crawler

Monitor the php moodle site error log.  It is informative.

Today, i peeked and saw a 5000 KB error log.  This is a text file, so that size is too big.  Figure out what is going on.  Dive into the error log and see whats happening. Looking at the error logs, actually browsing through them, you can see the errors that repeat themselves.  Something has to be calling the page that generates that error message.  In other words, lots of files in an application where never intended to be called - crawlers to that.  Little programs that want to index everything.

A crawler, trying to read pages is generating the repeated error messages in the log.  Probably a crawler trying to call this setuplib.php file.
line 463 of \\lib\\setuplib.php: moodle_exception thrown\n* line 85 of \\lib\\sessionlib.php: call to print_error()\n* line 44 of \\calendar\\set.php: call to require_sesskey()\n
This is a useful moodle tracker link - that discusses a way to protect your infrastructure from getting crawled.

No comments:

Post a Comment