Re: Django connection pooling using sqlalchemy connection pool
On Wed, Jul 11, 2012 at 6:45 PM, Russell Keith-Mageewrote: > There is a reason that Django doesn't manage connection pooling -- > it's because it's handled quite well by third party tools like pgPool. is there any similar tool for mysql? i've seen a few, but doesn't look so well accepted as Postgre ones -- Javier -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Django connection pooling using sqlalchemy connection pool
On Thu, Jul 12, 2012 at 3:37 AM, Anand Agarwalwrote: > As you know, Django uses new database connection for each request. This > works well initially. However as the load on the server increases, > creating/destroying connections to database starts taking significant amount > of time. You will find many questions about using some kind of connection > pooling for Django on sites likeStackOverflow For example, Django > persistent database connection. There is a reason that Django doesn't manage connection pooling -- it's because it's handled quite well by third party tools like pgPool. Yours, Russ Magee %-) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Django connection pooling using sqlalchemy connection pool
As you know, Django <https://www.djangoproject.com/>uses new database connection for each request. This works well initially. However as the load on the server increases, creating/destroying connections to database starts taking significant amount of time. You will find many questions about using some kind of connection pooling for Django on sites like StackOverflow <http://stackoverflow.com/>For example, Django persistent database connection. <http://stackoverflow.com/questions/1125504/django-persistent-database-connection> At BootStrapToday <http://bootstraptoday.com/> we use sqlalchemy<http://www.sqlalchemy.org/>‘s connection pooling mechanism with Django for pooling the database connections. We use variation of approach by Igor Katson<http://stackoverflow.com/users/37511/igor-katson> described in http://dumpz.org/67550/. Igor’s approach requires patching Django which we wanted to avoid. Hence we created a small function that we import in one of __init__.py (or models.py) (i.e. some file which gets imported early in the application startup). Here is more detail on how we do it at BootStrapToday<http://blog.bootstraptoday.com/2012/07/11/django-connection-pooling-using-sqlalchemy-connection-pool/> Regards Anand http://bootstraptoday.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.