Testing on our dev server and looking at the code I've noticed a couple
of things:
1) It dies with:
( ! ) Fatal error: Maximum function nesting level of '100' reached,
aborting! in <snipped path>/public_html/mollom/lib/Mollom.php on line 128
because the Mollom servers are all busy (1200 error).
2) The third party Mollom lib seems to differ from the most up to date
one even though they have the same version numbers - I assume the SS one
has been modified (which IMHO is normally a bad idea). In particular the
SS one used the xmlrpc1/2/3 addresses to get the server list from which
seems to be wrong.
3) Why does doCall call itself recursively without any safety stop?
Seems a strange way of handling the error, and obviously fails if the
Mollom servers are overloaded.
4) Why does SS call verifyKey every time it initialises a Mollom form?
Surely it's only necessary to call this if we are actually doing a spam
check. This is why none of my Mollom protected pages are even displaying
, so as a temporary fix I've simply commented out the verifyKey check in
MollomSpamProtector.php (line 29).
Is anyone else seeing these problems or is it just me?
Regards,
jam13
Fair enough.
> Regarding points (1) and (3), these were bits of Mollom.php that we
> *didn't* modify, but yeah, you might be right.
>
> For all of those reasons, it might be worth kicking off discussion on
> the mollom dev list to see if there are any plans to release a new
> version of their library?
The library does seem to need a bit of work in being able to handle
outages like this, but I imagine at the moment the Mollom devs are going
to be more concerned about the fact that their service seems to be
completely dead in the water :(.
> Regarding point (4), you're right, it sounds like this could be
> improved. Are you able to come up with a patch suitable for inclusion
> on the mollom module?
I will try to come up with something this morning as a matter of
urgency, because all our sites using Mollom are still borked.
jam13
That's the same list as I've got, so it can't be that.
I'm now getting a different failure on one site instead of the previous
1200 loop:
<code>
[User Error] Uncaught Exception: [error 1000] Unsupported API version
string.
POST /mypage/PageComments/PostCommentForm
Line 103 in /<sitepath>/mollom/code/MollomServer.php
Source
94 // if the cached serverlist is outdated
95 case 1100:
96 // delete cached server list first - in database
97 singleton('MollomServer')->clearCachedServerList();
98 // use default server list
99 Mollom::setServerList(Mollom::getServerList());
100 break;
101
102 default:
103 throw new Exception( $e->getMessage() , $errCode);
104 }
105
106 }
107 }
108
109 }
Trace
* MollomServer::doCall(checkContent,Array)
Line 77 of MollomServer.php
* MollomServer::checkContent(,,test,Jamie,,<myemailaddress>,)
Line 149 of MollomField.php
* MollomField->validate(RequiredFields)
Line 98 of RequiredFields.php
* RequiredFields->php(Array)
Line 106 of Validator.php
* Validator->validate()
Line 752 of Form.php
* Form->validate()
Line 189 of Form.php
* Form->httpSubmission(HTTPRequest)
Line 129 of RequestHandler.php
* RequestHandler->handleRequest(HTTPRequest)
Line 143 of RequestHandler.php
* RequestHandler->handleRequest(HTTPRequest)
Line 143 of RequestHandler.php
* RequestHandler->handleRequest(HTTPRequest)
Line 122 of Controller.php
* Controller->handleRequest(HTTPRequest)
Line 29 of ModelAsController.php
* ModelAsController->handleRequest(HTTPRequest)
Line 277 of Director.php
* Director::handleRequest(HTTPRequest,Session)
Line 121 of Director.php
* Director::direct(/mypage/PageComments/PostCommentForm)
Line 118 of main.php
</code>
jam13
The orignal lib has this section of code:
// code 1200 (Server too busy)
case 1200:
if(!count(self::$serverList)) self::getServerList();
// do call again
return self::doCall($method, $parameters,
self::$serverList[$counter], $counter++);
break;
which is supposed to recursively call the doCall method incrementing the
counter each time to select the next server in the list. The problem
AFAICS is that the incremented $counter never actually gets used because
at the beginning of the doCall method is:
private static function doCall($method, $parameters = array(), $server
= null, $counter = 0) {
[snip]
// still null
if($server === null) $server = self::$serverList[$counter];
i.e. because the recursive call passes the the same server through that
caused the 1200 error, $server is _not_ null and so the incremented
$counter is not used.
The end result is that if there is a persistent problem (1200 = busy)
with the first server in the $serverList then it just calls that same
server again recursively until it hits the nested call limit (100 on my
system).
I haven't tested it, but maybe changing the recursive call to:
return self::doCall($method, $parameters, null, $counter++);
would fix the problem?
jam13