[sqlalchemy] Conflicting state in identity map?

2011-05-20 Thread Adrian
I have a Turbogears server that uses sqlalchemy to interface with a
postgres database. Today, I noticed the server was down, so I tried
restarting it. Now my turbogears log is full of errors like:
AssertionError: A conflicting state is already present in the identity
map for key (class 'dr8db.ModelClasses.FITSHeaderKeyword', (1045,))
and
Exception KeyError: KeyError((class
'dr8db.ModelClasses.MaskbitsType', (61,)),) in bound method
InstanceState._cleanup of sqlalchemy.orm.state.InstanceState object
at 0x4445c90 ignored

I tried googling this stuff, but found nothing...

Basically it lets me start the paster (Turbogears) server, but after
~5-10 minutes the server dies and there are hundreds of these errors
in the log -- help!! I need to get this server back up ASAP!

Thanks,
Adrian

-- 
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.



Re: [sqlalchemy] Conflicting state in identity map?

2011-05-20 Thread Michael Bayer

On May 20, 2011, at 9:45 AM, Adrian wrote:

 I have a Turbogears server that uses sqlalchemy to interface with a
 postgres database. Today, I noticed the server was down, so I tried
 restarting it. Now my turbogears log is full of errors like:
 AssertionError: A conflicting state is already present in the identity
 map for key (class 'dr8db.ModelClasses.FITSHeaderKeyword', (1045,))
 and
 Exception KeyError: KeyError((class
 'dr8db.ModelClasses.MaskbitsType', (61,)),) in bound method
 InstanceState._cleanup of sqlalchemy.orm.state.InstanceState object
 at 0x4445c90 ignored
 
 I tried googling this stuff, but found nothing...
 
 Basically it lets me start the paster (Turbogears) server, but after
 ~5-10 minutes the server dies and there are hundreds of these errors
 in the log -- help!! I need to get this server back up ASAP!

That's an assertion that is generally unreachable from within the Session.   
The only ways I think you could get there would be via direct manipulation of 
session.identity_map, or if the Session is being shared among concurrent 
threads, which is not supported.

The main thing you'd be looking for here is, at what point did this server 
begin to fail and what event precluded that happening ?Either a code 
update, or perhaps the app was never tested against its current load, are the 
two possibilities.

-- 
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.