On Thu, Jun 28, 2012 at 11:45 PM, tonthon <[email protected]> wrote:
> Hi,
>
> I was wondering what values to setup for pool_size and pool_recycyle
> parameters.
>
> I think you have to set them up regarding your sql server configuration
> (mysql in my case), but how ?

I can only comment on pool_recycle because I've never had to change
pool_size from its default.

Setting pool_recycle is an application tuning thing. IIRC the default
setting for MySQL is to drop connections after 8 hours of inactivity.
If you always have activity on the connection more frequently than
that, you shouldn't need to set pool_recycle. If your connection to
MySQL can go quiet for long periods, use pool_recycle to essentially
ping the connection to prevent the MySQL server from dropping it.

I have an app that sees a few hits a day during business hours
Mon-Fri. Without setting pool_recycle the first hit in the morning
would typically fail because the connection had been dropped
overnight. I set pool_recycle to 3600 (seconds) and had no more
dropped connection problems.

As with all app tuning issues, YMMV...

Doug

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected].
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.

Reply via email to