On Tue, Oct 07, 2003 at 01:16:13PM -0700, [EMAIL PROTECTED] wrote: > I have problems with many concurrent request for Webware. I get the error:
Webware uses threads. That said, some Python DBAPIs are not totally threadsafe requiring that you, the programmer, provide synchronization. >From the python DBAPI2 spec: | http://www.pythonware.com/products/dbtoolkit/dbapi2.htm """ threadsafety (integer) Defines how the driver supports threading. 0 means no sharing, 1 means that multiple threads can use the module as long as they use separate connections, 2 means that multiple threads can share a connection as long as they use separate cursors, and 3 means full thread support. Most dbToolkit drivers provide level 1 support. """ >>> import MySQLdb >>> MySQLdb.threadsafety 1 > SQLError: (2014, "Commands out of sync; You can't run this command now") This is a specific MySQL error: | http://www.mysql.com/doc/en/Commands_out_of_sync.html """ If you get Commands out of sync; you can't run this command now in your client code, you are calling client functions in the wrong order! This can happen, for example, if you are using mysql_use_result() and try to execute a new query before you have called mysql_free_result(). It can also happen if you try to execute two queries that return data without a mysql_use_result() or mysql_store_result() in between. """ My guess is that you are executing two different queries on the same connection using two different cursors. I have never used DBPool before, but the problem might go away if you up your MySQL connection count. -g ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
