[sqlalchemy] Re: ODBC Connection is busy error

2008-04-27 Thread Michael Bayer
On Apr 28, 2008, at 12:02 AM, Michael Bayer wrote: > > > On Apr 27, 2008, at 9:58 PM, BruceC wrote: > >> >> I don't know whether this helps, but many thanks for looking at the >> issue :) > > unfortunately it doesnt say much at all. You're not sharing a Session > between multiple threads, right

[sqlalchemy] Re: ODBC Connection is busy error

2008-04-27 Thread Michael Bayer
On Apr 27, 2008, at 9:58 PM, BruceC wrote: > > I don't know whether this helps, but many thanks for looking at the > issue :) unfortunately it doesnt say much at all. You're not sharing a Session between multiple threads, right ? --~--~-~--~~~---~--~~ You re

[sqlalchemy] Patch: Use generators for ShardedQuery results (Was: Re: [sqlalchemy] Re: sharding and combining sort result from multiple db)

2008-04-27 Thread Kyle Schaffrick
On Sun, 27 Apr 2008 20:39:25 -0400 Kyle Schaffrick <[EMAIL PROTECTED]> wrote: > > On Sun, 27 Apr 2008 20:23:24 -0400 > Michael Bayer <[EMAIL PROTECTED]> wrote: > > > > But yes its probably how that section should be done anyway so > > that ShardedQuery so that the iterative framework provided by

[sqlalchemy] Re: ODBC Connection is busy error

2008-04-27 Thread BruceC
Our Pylons setup emails every traceback error to our developers, & with about 80 users, we've been getting a couple of hundred error emails a day, almost all with this same error (Tomorrow we will have about 1200 users on our system). The following is an excerpt of the traceback message. Every err

[sqlalchemy] Re: ODBC Connection is busy error

2008-04-27 Thread Rick Morrison
> > > It is possible we could re-introduce "check for open cursors" as a > pool events extension. It would raise an error if any connection is > returned with associated cursors still opened and could track down > issues like these. > That would be a great diagnostic tool for this: It's hard to

[sqlalchemy] Re: ODBC Connection is busy error

2008-04-27 Thread Michael Bayer
On Apr 27, 2008, at 8:55 PM, Rick Morrison wrote: > > What I'm not sure of at this point is if theres some cursor usage > > specific to the MS-SQL dialect that might be external to the > > ResultProxyif Rick could comb through that for me that would be > > helpful. > > The cursor is used pre

[sqlalchemy] Re: ODBC Connection is busy error

2008-04-27 Thread Rick Morrison
> What I'm not sure of at this point is if theres some cursor usage > specific to the MS-SQL dialect that might be external to the > ResultProxyif Rick could comb through that for me that would be > helpful. The cursor is used pre_exec() if an INSERT statement tries to set a literal PK on a se

[sqlalchemy] Re: sharding and combining sort result from multiple db

2008-04-27 Thread Kyle Schaffrick
On Sun, 27 Apr 2008 20:23:24 -0400 Michael Bayer <[EMAIL PROTECTED]> wrote: > > But yes its probably how that section should be done anyway so that > ShardedQuery so that the iterative framework provided by > iterate_instances() (this method would need to be used instead of > instances()).

[sqlalchemy] Re: sharding and combining sort result from multiple db

2008-04-27 Thread Michael Bayer
On Apr 27, 2008, at 5:04 PM, Kyle Schaffrick wrote: > partial = partial + list(...) > > The bits inside that list() calls up to Query.instances for each shard > in the for loop, which seems to return an iterator. > > Assuming the desired ordering can be figured out from that spot, and a > pytho

[sqlalchemy] Re: Using declarative when imports happen before create_engine() ??

2008-04-27 Thread Michael Bayer
On Apr 27, 2008, at 8:25 AM, Allen Bierbaum wrote: > The problem that as I understand it, to use declarative, you can't > import an module that defines a table-based object until after some > initialization code has been run to connect to a database and create a > 'Base' class for the declarativ

[sqlalchemy] Re: ODBC Connection is busy error

2008-04-27 Thread Michael Bayer
On Apr 27, 2008, at 2:55 AM, Esceo wrote: > > Just a side note, is the pool code thread safe? > i.e. no two threads would possibly checkout the same connection at any > point in time? we're pretty confident its completely threadsafe as of 0.3.11, we have several different kinds of tests for i

[sqlalchemy] Re: ODBC Connection is busy error

2008-04-27 Thread Michael Bayer
On Apr 27, 2008, at 8:10 AM, BruceC wrote: > > Hi Michael, > > Thanks for your persistence :) > > I've searched through my app, & we don't seem to have any calls to > fetchone(), so I'm not sure what else to look for, but I'll try to do > some debugging with ResultProxys, & see if that leads to

[sqlalchemy] Re: sharding and combining sort result from multiple db

2008-04-27 Thread Kyle Schaffrick
On Thu, 27 Mar 2008 10:24:10 -0400 Michael Bayer <[EMAIL PROTECTED]> wrote: > > On Mar 27, 2008, at 7:39 AM, crybaby wrote: > > > > Correct me if I am wrong, as of right now, relationship between > > multiple db shards, like sorting, grouping and joins have to be done > > in application level. >

[sqlalchemy] Using declarative when imports happen before create_engine() ??

2008-04-27 Thread Allen Bierbaum
I am investigating the use of the declarative extension. It looks very attractive, but I have a problem... I have a large project that is using the standard methods of configuring tables and mappers. More specifically, there is a single method in my domain package that is called once the system

[sqlalchemy] Re: ODBC Connection is busy error

2008-04-27 Thread BruceC
Hi Michael, Thanks for your persistence :) I've searched through my app, & we don't seem to have any calls to fetchone(), so I'm not sure what else to look for, but I'll try to do some debugging with ResultProxys, & see if that leads to any possible answers. On a side note, in our Pylons develo