On Jul 1, 2008, at 3:04 AM, Simon Wittber wrote:
> > While stress testing my Pylons Web App, SQLAlchemy will occasionally > throw the below exception. > > I've also seen the below exception on applications which have been > running for a few weeks. > > Has anyone come across this before? I'm think it might be a threading > issue, as it occurs intermittently, and is not always reproducible. this means that at least one of the mappers is not fully compiled, but the "compiled" flag on a mapper which calls upon it is set. This usually implies that the compilation process failed midway, which in all cases would throw an exception. The compilation of mappers is synchronized such that whenever compile() is called, if any uncompiled mappers exist, they'll be compiled too before the method completes (and its all mutexed). I'd inspect to see if compilation is failing and not being picked up, if theres a module with mappings in it which gets imported late in the game (which shouldn't be a problem), or if theres maybe some add_property() calls which might be occuring at an awkward stage of compilation (which also shouldn't be a problem). The only other possibility is that maybe the mapper structure is being accessed without the compile() step being called, though the construction of a Query compiles all mappers too. One possibility would be to turn on sqlalchemy.orm INFO logging which will be pretty verbose about mappers compiling, so you'd be able to see exactly whats compiled before the exception gets thrown. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---
