5 Sep 21:18
Too many connections
From: gatto <thegattomatto <at> gmail.com>
Subject: Too many connections
Newsgroups: gmane.comp.python.sqlalchemy.user
Date: 2008-09-05 19:19:53 GMT
Subject: Too many connections
Newsgroups: gmane.comp.python.sqlalchemy.user
Date: 2008-09-05 19:19:53 GMT
hi everyone. just started using sqlalchemy and elixir recently. i'm not having any issues with coding yet, just this one: OperationalError: (OperationalError) (1040, 'Too many connections') as a workaround for this problem, i created a cron job to restart apache once every hour and that is mostly working. but i really need to find out what is causing this. i'm using a custom built mvc framework that runs atop mod_python, and in the base application class i have the following code, which executes once at the beginning of the request: metadata.bind = 'mysql://' + app_config.database.user + ':' + app_config.database.password + '@' + app_config.database.host + ': 3306/' + app_config.database.schema metadata.bind.echo = True metadata.bind.recycle = 3600 i had thought setting recycle to 3600 in this way would cause the connections to be reused every 5 minutes if they had remained open. we're only getting a couple hundred unique visitors per day currently so i'm surprised that the error happens so quickly. how can i figure this out? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy <at> googlegroups.com To unsubscribe from this group, send email to sqlalchemy+unsubscribe <at> googlegroups.com For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---(Continue reading)
RSS Feed