> > Example code is: > > orm = OrmManager(....) > session = orm.get_session() > my_obj = session.query(....) > my_obj.attribute = 'new value' > session.commit() > > > I can see an issue here, talking to you. We used the SingleThreadedPool > with pool_size=50. But looking at our code, it seems that we never free the > created sessions (session.close() ). Are they garbage collected ? Do we > need to explicitly call session.close() ? > The problem occurs when multiple access are done, we may use all the > sessions available before the garbage collector runs... > > > The tables not existing points to an extremely basic issue like one bit of > code talking to one database, and another bit of code talking to another, > mistakenly assuming they are the same file. There's nothing in the > snippet of code that has any bearing on an issue like this. Only if you > can provide a short test case that reproduces the error, or if you can > identify the problem by carefully debugging your program by watching the > rendered SQL and stepping through, ensuring the correct database is in use > at all times, can this problem be solved. >
Ok thanks Michael. We found a work around. We are now closing sessions once the object is retriewed from database since we don't care if it is not synchronized with fresh data. I will post another topic since it does not seem to work with inherited tables. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To view this discussion on the web visit https://groups.google.com/d/msg/sqlalchemy/-/YortWXjsv8wJ. 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.