Re: [MRBS-general] Problem with Day calculation
Brought to you by:
jberanek
From: Campbell M. <cam...@gm...> - 2012-11-30 22:15:31
|
Many thanks for that. I've committed your fix in the trunk in Rev 2567. Campbell > -----Original Message----- > From: Carter N. [mailto:N.C...@sw...] > Sent: 30 November 2012 09:48 > To: mrb...@li... > Subject: [MRBS-general] Problem with Day calculation > > Hi all, > > First post here, reporting a problem, but one accompanied with a > solution (I hope :-) > > First of all, thanks to all who've contributed to this excellent > system; > we're very pleased with it here at Swansea University's psychology > department. > > Our server running MRBS started suffering serious slowdowns, caused by > 100% CPU usage, which we traced to PHP-CGI.EXE. PHP-ERRORS.LOG > indicated > that the maximum execution time was exceeded in STANDARD_VARS.INC.PHP > on > lines around line 40 (a valid-date check loop). > > Turns out that crawl-66-249-66-169.googlebot.com was requesting URLs > with negative day numbers. An example from our logs: > > /MRBS/week.php year=2012&month=12&day=-4&area=5&room=13 > > Our solution is to replace the equality test on line for less than or > equal, thus: > > if ($day <= 0) > > I suppose it shouldn't be necessary in an ideal world, but it should > make it a bit more robust. > > I think I'll write to Google to point out that their bot is > 'misbehaving'. > > I hope this helps. > > Neil. > > -- > Neil Carter > Ymchwil Technegydd Research > Technician > Coleg y Gwyddorau Dynol ac Iechyd College of Human and Health > Sciences > Prifysgol Abertawe Swansea > University > Parc Singleton Singleton > Park > Abertawe > Swansea > SA2 8PP SA2 > 8PP > > +44 (0)1792 295610 > http://psy.swansea.ac.uk/staff/carter/ > > > > > ----------------------------------------------------------------------- > ------- > Keep yourself connected to Go Parallel: > TUNE You got it built. Now make it sing. Tune shows you how. > http://goparallel.sourceforge.net > _______________________________________________ > mrbs-general mailing list > mrb...@li... > https://lists.sourceforge.net/lists/listinfo/mrbs-general > Want to unsubscribe: mailto:mrbs-general- > re...@li...?subject=unsubscribe |