On Oct 15, 2008, at 8:05 PM, andres wrote:
> > hi, > > i'm having trouble with mysql connections using SQLAlchemy 0.5.0beta3. > when there are >15 connections in scope, the call to grab a new > connection hangs. here is a sample script which hangs for mysql but > not for sqllite: the default maximum size of the pool is 5 connections plus an overflow of 10, for a max of 15. This can be changed using pool_size and max_overflow described at http://www.sqlalchemy.org/docs/05/dbengine.html#dbengine_options . > > also, repeated calls to engine.connect() do not return the same > connection object in the example above. what else do i need to do in > order to force the engine to return the same connection object. connect() always returns a unique connection so that applications can create unique connections concurrent with the current "contextual" connection. Typical usage of "threadlocal" is such that the underlying Connection isn't accessed directly; instead engine.execute() or statement.execute() is called. To access the "contexual" connection directly, that which correspnds to the current thread, call contextual_connect() as described in the second half of http://www.sqlalchemy.org/docs/05/dbengine.html#dbengine_implicit_strategies . --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---