> are you folks on the latest MySQLDB ? I use MySQLdb version 1.2.1_p2, which is, as far as I know, the latest version. Which version is used when testing SA ?
I've also noticed other types of SQL errors, such as "Lost connection to MySQL server during query" (which of course usually don't appear). The whole problem is hardly reproductible, and errors are not always the same, and don't appear everytime (something like a race condition ?). Finally, I often got this error from SA: [...] in feed_audit aa.flush() File "build/bdist.linux-i686/egg/sqlalchemy/ext/assignmapper.py", line 16, in do File "build/bdist.linux-i686/egg/sqlalchemy/orm/session.py", line 234, in flush File "build/bdist.linux-i686/egg/sqlalchemy/orm/unitofwork.py", line 207, in flush File "build/bdist.linux-i686/egg/sqlalchemy/orm/unitofwork.py", line 377, in execute File "build/bdist.linux-i686/egg/sqlalchemy/orm/unitofwork.py", line 650, in execute File "build/bdist.linux-i686/egg/sqlalchemy/orm/unitofwork.py", line 615, in _execute_childtasks File "build/bdist.linux-i686/egg/sqlalchemy/orm/unitofwork.py", line 645, in execute File "build/bdist.linux-i686/egg/sqlalchemy/orm/unitofwork.py", line 599, in _save_objects File "build/bdist.linux-i686/egg/sqlalchemy/orm/mapper.py", line 850, in save_obj File "build/bdist.linux-i686/egg/sqlalchemy/engine/base.py", line 246, in execute File "build/bdist.linux-i686/egg/sqlalchemy/engine/base.py", line 270, in execute_clauseelement File "build/bdist.linux-i686/egg/sqlalchemy/engine/base.py", line 285, in execute_compiled File "build/bdist.linux-i686/egg/sqlalchemy/engine/default.py", line 149, in pre_exec File "build/bdist.linux-i686/egg/sqlalchemy/engine/default.py", line 192, in _process_defaults File "build/bdist.linux-i686/egg/sqlalchemy/engine/base.py", line 699, in get_column_default File "build/bdist.linux-i686/egg/sqlalchemy/schema.py", line 662, in accept_schema_visitor File "build/bdist.linux-i686/egg/sqlalchemy/engine/base.py", line 732, in visit_column_default File "build/bdist.linux-i686/egg/sqlalchemy/engine/base.py", line 720, in exec_default_sql TypeError: unsubscriptable object (putting a bunch of debug messages in exec_default_sql shows the object returned by self.proxy(str(c), c.get_params()).fetchone() is None...) > if we wanted to prepare a test case for this using the basic DBAPI, > it would have to involve using a single connection in multiple threads. Not quite sure to understand but I tried pool_size=1 in SA (create_engine param) and server.thread_pool = 10 in CherryPy, and got the same error (as expected). Hope it helps. Cheers, Seb -- Sébastien LELONG On Tuesday 19 September 2006 02:13, Michael Bayer wrote: > my next suspicion is that mysqldb doesnt like when the same > connection gets moved to be used in another thread, which will occur > when the default connection pool is being used. i was already > thinkikng that, but your setting of thread_pool fixing it seems to > suggest it even more strongly. > > are you folks on the latest MySQLDB ? > > if we wanted to prepare a test case for this using the basic DBAPI, > it would have to involve using a single connection in multiple threads. > > sqlalchemy *should* at this point have all open cursors explicitly > closed before connections are returned to the pool, since ResultProxy > will close out its cursor; however i havent tested this strongly. i > can perhaps put in more aggressive logic into the pool itself to make > this happen, since we are tracking the individual cursors as well. > > On Sep 15, 2006, at 12:07 PM, Sébastien LELONG wrote: > > Hello there, > > > > I have the same problem with these "Commands out of sync; you can't > > run this > > command now", using SA 0.2.4 (SA 0.2.8 not tested yet, but appears > > to have > > the same behavior) with CherryPy 2.2.1 and MySQL 5.0.22 (and also > > MySQLdb > > 1.2.1_p2...) > > > >> [...] reduced test case but I can't get it to occur in anything > >> but my > >> full TurboGears application > > > > This is the same for me. Without explaining why, when I set CherryPy > > server.thread_pool = 0, the problem disappears... > > > >> do people have this problem working with MySQLDB directly ? im sorta > >> running out of options here. > > > > I tried MySQLdb directly, which works nice for me, as expected > > according to > > what described before. > > > > > > Hope it helps. > > > > > > Cheers, > > > > > > Seb. > > -- > > Sébastien LELONG > > > > On Thursday 14 September 2006 19:44, Karl Guertin wrote: > >> On 9/14/06, Michael Bayer <[EMAIL PROTECTED]> wrote: > >>> do people have this problem working with MySQLDB directly ? im > >>> sorta > >>> running out of options here. > >> > >> I haven't been able to find any. I'll continue trying to track down > >> the source of the problem and pull this thread up again if/when I > >> find > >> the answer. Thanks for your help. > >> > >> --------------------------------------------------------------------- > >> ---- > >> 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 ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Sqlalchemy-users mailing list Sqlalchemy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users