File
"/srv/osfkarl/production/42/eggs/zope.component-3.6.0-py2.6.egg/zope/component/registry.py",
line 153, in registeredUtilities ) in
self._utility_registrations.iteritems(): RuntimeError: dictionary changed
size during iteration
Basically, Pyramid uses the registry to cache renderers. The registry is
not, nor is it intended to be thread safe. The authors of zope.component
never intended that the state of the registry would be mutated after initial
startup. Once in a blue moon, you'll hit this and get the exception below.
It's a concurrency error and can only occur of two threads are
simultaneously trying to use the same, not yet cached in this process
template. Once an application is up and its templates have been exercised,
and therefore cached, this won't happen again for the life of that process.
I pointed this one out to Chris M about a year or so ago. I don't remember
when exactly. He acknowledged it and then shrugged it off. I think he
thinks this comes up so seldom that it's not worth redoing how templates are
cached in Pyramid to use a threadsafe data structure.
We could have retry catch this one, since it should resolve itself by the next request
We need to slow everything down until we get clarity on the Q4 budget.