Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: Dev

z3c.saconfig engine creation configuration

 

 

Zope dev RSS feed   Index | Next | Previous | View Threaded


mborch at gmail

Jun 24, 2009, 6:42 AM

Post #1 of 4 (478 views)
Permalink
z3c.saconfig engine creation configuration

On MySQL, it's necessary to supply to ``pool_recycle`` parameter on
engine creation, else the connection dies after some timeout and the
pool is unable to hand out a session.

The result of this is that the first request fails whenever the
connection has been dropped.

Attached is a patch that allows supplying these pool-related
configuration options directly in the ZCML directive (db:engine).

\malthe
Attachments: patch.diff (1.77 KB)


l at lrowe

Jun 24, 2009, 4:46 PM

Post #2 of 4 (425 views)
Permalink
Re: z3c.saconfig engine creation configuration [In reply to]

Malthe Borch wrote:
> On MySQL, it's necessary to supply to ``pool_recycle`` parameter on
> engine creation, else the connection dies after some timeout and the
> pool is unable to hand out a session.
>
> The result of this is that the first request fails whenever the
> connection has been dropped.
>
> Attached is a patch that allows supplying these pool-related
> configuration options directly in the ZCML directive (db:engine).
>
> \malthe

I would rather we did not hardcode the defaults from SQLAlchemy into the
engine directive (I guess they could change in future). Instead use a
default of None and only supply the parameter if the config option is set.

Laurence

_______________________________________________
Zope-Dev maillist - Zope-Dev[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


mborch at gmail

Jun 25, 2009, 1:14 AM

Post #3 of 4 (421 views)
Permalink
Re: z3c.saconfig engine creation configuration [In reply to]

Laurence Rowe wrote:
> I would rather we did not hardcode the defaults from SQLAlchemy into the
> engine directive (I guess they could change in future). Instead use a
> default of None and only supply the parameter if the config option is set.

Sounds right to me. Attached is an update patch.

\malthe
Attachments: patch.diff (2.21 KB)


mborch at gmail

Jun 25, 2009, 1:14 AM

Post #4 of 4 (421 views)
Permalink
Re: z3c.saconfig engine creation configuration [In reply to]

Laurence Rowe wrote:
> I would rather we did not hardcode the defaults from SQLAlchemy into the
> engine directive (I guess they could change in future). Instead use a
> default of None and only supply the parameter if the config option is set.

Sounds right to me. Attached is an update patch.

\malthe
Attachments: patch.diff (2.21 KB)

Zope dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.