Fatal error: Cannot redeclare class ImageData
in /<redacted>/data/temp/recess.php on line 7947
Turns out there were several copies of my ImageData.class.php file
appended one after another in the class cache file.
ImageData is related to some image generation things this project does.
When you load a page on the site, it typically includes two or more
generated images. The browser requests these in parallel. Recess Library
has to load the ImageData model in both requests. In both requests it
goes on the $missedClasses list. The class cache file is only open for a
moment at the end of the run, so the first of the 'simultaneous' image
requests appends its missed files. The lock only lasts a millisecond or
few, so the second request opens the file to append after only a
millisecond lag and writes the same missed class.
My site happens to hit this bug very reproducibly, but it could happen
less consistently shortly after deploying changes on any site with a lot
of concurrent traffic.
--
Joshua Paine
LetterBlock: Web applications built with joy
http://letterblock.com/
301-576-1920