[sqlalchemy] QueuePool limit size reached, using expression API only

2012-04-09 Thread Mitchell Hashimoto
Hi, I am continually getting this sort of error after some amount of time: QueuePool limit of size 30 overflow 10 reached, connection timed out, timeout 30 We're using only the SQLAlchemy Core expressions API, so we're not wrapping anything in sessions, so I'm not sure how this is happening.

Re: [sqlalchemy] QueuePool limit size reached, using expression API only

2012-04-09 Thread Michael Bayer
close your connections after you are finished with them. On Apr 9, 2012, at 2:43 PM, Mitchell Hashimoto wrote: Hi, I am continually getting this sort of error after some amount of time: QueuePool limit of size 30 overflow 10 reached, connection timed out, timeout 30 We're using only

Re: [sqlalchemy] QueuePool limit size reached, using expression API only

2012-04-09 Thread Claudio Freire
On Mon, Apr 9, 2012 at 4:03 PM, Michael Bayer mike...@zzzcomputing.com wrote: close your connections after you are finished with them. They should be automatically returned to the pool when unreferenced. The OP may be storing stray references somewhere, or associating them somehow to a

Re: [sqlalchemy] QueuePool limit size reached, using expression API only

2012-04-09 Thread Michael Bayer
On Apr 9, 2012, at 3:25 PM, Claudio Freire wrote: On Mon, Apr 9, 2012 at 4:03 PM, Michael Bayer mike...@zzzcomputing.com wrote: close your connections after you are finished with them. They should be automatically returned to the pool when unreferenced. The OP may be storing stray

Re: [sqlalchemy] QueuePool limit size reached, using expression API only

2012-04-09 Thread Claudio Freire
On Mon, Apr 9, 2012 at 4:36 PM, Michael Bayer mike...@zzzcomputing.com wrote: Using context managers, i.e. with engine.connect() as conn, is the most straightforward. IIRC, context managers are new in SA, aren't they? -- You received this message because you are subscribed to the Google

Re: [sqlalchemy] QueuePool limit size reached, using expression API only

2012-04-09 Thread Michael Bayer
there's some new-er ones including that one, we've had a few for some years On Apr 9, 2012, at 5:39 PM, Claudio Freire wrote: On Mon, Apr 9, 2012 at 4:36 PM, Michael Bayer mike...@zzzcomputing.com wrote: Using context managers, i.e. with engine.connect() as conn, is the most

Re: [sqlalchemy] QueuePool limit size reached, using expression API only

2012-04-09 Thread Michael Bayer
better one to use from engine is begin() (also new in 0.7.6): with engine.begin() as conn: ... that way everything you do with conn is on the same transaction. On Apr 9, 2012, at 5:39 PM, Claudio Freire wrote: On Mon, Apr 9, 2012 at 4:36 PM, Michael Bayer mike...@zzzcomputing.com

Re: [sqlalchemy] QueuePool limit size reached, using expression API only

2012-04-09 Thread Claudio Freire
On Mon, Apr 9, 2012 at 6:50 PM, Michael Bayer mike...@zzzcomputing.com wrote: better one to use from engine is begin() (also new in 0.7.6): with engine.begin() as conn:    ... that way everything you do with conn is on the same transaction. Yeah, because I'm using 0.5.8 (and couldn't switch

Re: [sqlalchemy] QueuePool limit size reached, using expression API only

2012-04-09 Thread Mitchell Hashimoto
On Monday, April 9, 2012 12:03:29 PM UTC-7, Michael Bayer wrote: close your connections after you are finished with them. So I suppose my confusion is where is the connection being made. I have a singleton engine instance running around, and when I query, I basically do something like

Re: [sqlalchemy] QueuePool limit size reached, using expression API only

2012-04-09 Thread Michael Bayer
On Apr 9, 2012, at 8:24 PM, Mitchell Hashimoto wrote: On Monday, April 9, 2012 12:03:29 PM UTC-7, Michael Bayer wrote: close your connections after you are finished with them. So I suppose my confusion is where is the connection being made. I have a singleton engine instance running

Re: [sqlalchemy] QueuePool limit size reached, using expression API only

2012-04-09 Thread Mitchell Hashimoto
On Mon, Apr 9, 2012 at 5:32 PM, Michael Bayer mike...@zzzcomputing.com wrote: On Apr 9, 2012, at 8:24 PM, Mitchell Hashimoto wrote: On Monday, April 9, 2012 12:03:29 PM UTC-7, Michael Bayer wrote: close your connections after you are finished with them. So I suppose my confusion is

Re: [sqlalchemy] QueuePool limit size reached, using expression API only

2012-04-09 Thread Michael Bayer
On Apr 9, 2012, at 8:32 PM, Michael Bayer wrote: You'd want to look at any processes/threads hanging correction, threads. other processes wouldn't have any impact here. -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group,