assuming youre using postgres, when it hangs you should take a look at the pg_locks table: and create an additional page in your application that when accessed will produce a dump of all current callstacks. that will provide a lot of insight into what concurrent operations are going on. just an example of how you can deadlock even in a single thread, say youre using two connections A and B. A opens a transaction and accesses table X. B opens a transaction and accesses table Y. then you try to access table Y within A - deadlock ! since B has a lock on Y...all within one thread. if youre using SQLAlchemy's ORM, it *should* only be using one connection per thread at a time (although if so, it would be nice to see those stack traces to see where it might be tripping up), and when connections are returned it calls a rollback() to release any locks held by that connection. if youre doing your own SQL using engine.connect(), then you have the possibility of the situation above. its in SA's interests to have this issue resolved so feel free to send along whatever additional information you can gather. On Jun 23, 2006, at 1:58 AM, Dennis Muhlestein wrote: Ok, so I've upgraded mydrawings.com to use SQLAlchemy 0.2.3 a few days ago w/ the hopes that any database locking up problems on 0.1.x were alleviated. I'm still having lockups though. |
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Sqlalchemy-users mailing list Sqlalchemy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users