[sqlalchemy] Database in inconsistent state in user data (login in a web server) retrieval

2010-12-23 Thread Hector Blanco
Hello everyone! I am currently working with a webserver (Grok) that starts different threads (automatically) for the requests that arrive to it. The information is serialized in a MySQL database (which is acceded through SqlAlchemy). The users' information is stored in that MySQL database. The

Re: [sqlalchemy] Database in inconsistent state in user data (login in a web server) retrieval

2010-12-23 Thread Michael Bayer
On Dec 23, 2010, at 2:09 PM, Hector Blanco wrote: Hello everyone! I am currently working with a webserver (Grok) that starts different threads (automatically) for the requests that arrive to it. The information is serialized in a MySQL database (which is acceded through SqlAlchemy). The

Re: [sqlalchemy] Database in inconsistent state in user data (login in a web server) retrieval

2010-12-23 Thread Hector Blanco
Thank you for your quick reply! I tried to change the method that grabs the user to: def getByName(userName): retval = None try: retval = Database.session.query(User.User).filter( User.User.userName== userName

Re: [sqlalchemy] Database in inconsistent state in user data (login in a web server) retrieval

2010-12-23 Thread Michael Bayer
it only has to do with what your appserver does when a connection is broken. The finally method is probably never called.You can change the Python warnings filter to emit those warnings as exceptions, in which you should be able to get stack traces in your logs. On Dec 23, 2010, at

Re: [sqlalchemy] Database in inconsistent state in user data (login in a web server) retrieval

2010-12-23 Thread Hector Blanco
Ok! I'll let you know... Thank you so much! It seems to fail less with the finally, though :) 2010/12/23 Michael Bayer mike...@zzzcomputing.com: it only has to do with what your appserver does when a connection is broken.     The finally method is probably never called.    You can change the

Re: [sqlalchemy] Database in inconsistent state in user data (login in a web server) retrieval

2010-12-23 Thread Hector Blanco
With that (catching all the errors) seems to work better. It also seems that the problem improves if I wait a bit (4 or 5 seconds) after the server is started... 2010/12/23 Hector Blanco white.li...@gmail.com: Ok! I'll let you know... Thank you so much! It seems to fail less with the